Skip to content

Commit

Permalink
Update tag search api doc for #1
Browse files Browse the repository at this point in the history
  • Loading branch information
tengattack committed Apr 10, 2017
1 parent 3e0b397 commit dec4701
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions DOC/api/tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,16 @@
```javascript
{
"name": "akame ga kill",
"type"?: "bangumi",
"keywords": true,
"multi": true
}
```

- `type`: Get the specified type of tag(s). If not set, it will return all kind of tags.
- `keywords`: Search tag(s) by matching part of tag's name.
- `multi`: Return the collection of tags or not.

* return:
```javascript
{
Expand Down Expand Up @@ -670,6 +676,46 @@
]
}
```
or (multi=false):
```javascript
{
"success": true,
"found": true,
"tag": {
"_id": "548f0004f892774b140ac618",
"activity": 0,
"locale": {
"ja": "アカメが斬る!",
"zh_cn": "斩·赤红之瞳!",
"en": "Akame Ga Kill",
"zh_tw": "斬!赤紅之瞳"
},
"name": "アカメが斬る!",
"syn_lowercase": [
"アカメが斬る!",
"斩·赤红之瞳!",
"akame ga kill",
"akame ga kiru",
"斬!赤紅之瞳"
],
"synonyms": [
"アカメが斬る!",
"斩·赤红之瞳!",
"Akame Ga Kill",
"Akame Ga Kiru",
"斬!赤紅之瞳"
],
"type": "bangumi"
}
}
```
or (not found):
```javascript
{
"success": true,
"found": false
}
```
* note:
* name should exactly the same in synonyms, case insensitive.

Expand Down

0 comments on commit dec4701

Please sign in to comment.