add route .../announcement

This commit is contained in:
Zero 2020-01-22 20:26:15 -05:00
parent 373696a81f
commit 099501966d
2 changed files with 144 additions and 0 deletions

View File

@ -1,3 +1,94 @@
<details>
<summary>GET /g/s/announcement/</summary>
GET the current announcement. This is actually just info about a bunch of communities and public chats
__query strings__
|name|description|required|
| - | - | - |
|start|paginated data index offset. Difference to|False|
|size|max number of items to get for paginated requests|False|
|language|Content language to be returned|False|
__headers__
|name|description|required|
| - | - | - |
|NDCDEVICEID|The device id generated by the app. See|True|
|NDC-MSG-SIG|Message signature (?) generated by the app|False|
|SMDEVICEID|I don't know, seems to be a non-string hex number|False|
|AUID|The auid (UUIDv4) generated on amino servers for this client, retrieved with GET /g/s/auid|False|
__responses__
- 200 - Info Retrieved
Info Retrieved
Announcement blogs and threads were retrieved
```JSON
{
"communityInfoMapping": {
"<ndcId>": "{...} <Community object>"
},
"paging": "{...} <Paging info>",
"playlistInThreadList": {
"<->": " <Info about videos playing in chat threads>",
"<UUIDv4 thread id>": {
"currentItemIndex": "14 <Playlist length>",
"currentItemStatus": "2 <Likely playlist current index>",
"items": [
"{...} <Youtube video object>"
]
}
},
"threadList": [
"{...} <Chat thread object>"
],
"userInfoInThread": {
"<->": " <Info about users in chat threads>",
"<UUIDv4 thread id>": {
"userProfileCount": 2,
"userProfileList": [
"{...} <User object>"
]
}
}
}
```
- 200:0 - api:ok
api:ok
The request was successful. This is not a separate response, but included in every 200 response's json
```JSON
{
"api:message": "OK",
"api:timestamp": "2020-01-22T23:49:13Z <API timestamp>",
"api:statuscode": "0 <Statuscode 0 is ok>",
"api:duration": "0.010s <Processing time>"
}
```
- 400:104 - Missing NDCDEVICEID
Missing NDCDEVICEID
The NDCDEVICEID header was not included, or did not compute on amino servers
```JSON
{
"api:message": "Invalid Request. Please update to the latest version. If the problem continues, please contact us.",
"api:timestamp": "2020-01-22T22:11:28Z <API timestamp>",
"api:statuscode": "104 <Statuscode 104 represents a bad NDCDEVICEID header>",
"api:duration": "0.000s <Processing time>"
}
```
</details>
<details>
<summary>GET /g/s/auid/</summary>
GET an auid for this device

View File

@ -31,10 +31,18 @@ vars:
name: pageToken
description: page token for paginated requests
required: false
start:
name: start
description: paginated data index offset. Difference to
required: false
size:
name: size
description: max number of items to get for paginated requests
required: false
language:
name: language
description: Content language to be returned
required: false
pagingType:
name: pagingType
description: Seems to have no effect, default value is `t`
@ -335,6 +343,39 @@ vars:
],
"paging": "{...} <Paging info>"
}
announcement:
GET:
ok:
lang: JSON
content:
{
"communityInfoMapping": {
"<ndcId>": "{...} <Community object>"
},
"paging": "{...} <Paging info>",
"playlistInThreadList": {
"<->": " <Info about videos playing in chat threads>",
"<UUIDv4 thread id>": {
"currentItemIndex": "14 <Playlist length>",
"currentItemStatus": "2 <Likely playlist current index>",
"items": [
"{...} <Youtube video object>"
]
}
},
"threadList": [
"{...} <Chat thread object>"
],
"userInfoInThread": {
"<->": " <Info about users in chat threads>",
"<UUIDv4 thread id>": {
"userProfileCount": 2,
"userProfileList": [
"{...} <User object>"
]
}
}
}
api_codes:
api:104:
lang: JSON
@ -490,3 +531,15 @@ routes:
title: Communities Retrieved
description: The communities for frontpage display were retrieved
body: $response.topic-communities.GET.ok
/g/s/announcement/:
GET:
description: GET the current announcement. This is actually just info about a bunch of communities and public chats
query strings:
- $query-strings.all.start
- $query-strings.all.size
- $query-strings.all.language
responses:
"200":
title: Info Retrieved
description: Announcement blogs and threads were retrieved
body: $response.announcement.GET.ok