Skip to content

Commit

Permalink
update api/torrent
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixlzx committed Mar 24, 2015
1 parent 00f02cc commit 376d855
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions DOC/api/torrent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
### Torrent API

#### Get latest torrents
* path: `/api/torrent/latest`
* method: `GET`
* return:
```javascript
{
"page_count": <number>,
"torrents": <Array>
}
```

#### Get specified torrent page
* path: `/api/torrent/page/:pagenum`
* method: `GET`
* params:
* pagenum: <number>
* return:
```javascript
{
"torrent": <Array>
}
```

#### Get torrents published by self
* path: `/api/torrent/my`
* method: `GET`
* return:
```javascript
{
"page_count": <number>,
"torrents": <Array>
}
```
* note:
* user session required.

#### Get torrents published by team
* path: `/api/torrent/team`
* method: `GET`
* return:
```javascript
(TODO)
```

#### Search torrent by tag_id
* path: `/api/torrent/search`
* methid: `POST`
* post:
```javascript
{
tag_id: <string>|<Array>
}
```
* return:
```javascript
(TODO)
```

0 comments on commit 376d855

Please sign in to comment.