first commit

This commit is contained in:
Zero 2020-01-21 17:06:22 -05:00
commit 1e283771f3
4 changed files with 129 additions and 0 deletions

0
.gitignore vendored Normal file
View file

10
README.md Normal file
View file

@ -0,0 +1,10 @@
# API-Docs
What is this?
=============
This is a collection of `.yml` files that describe how to use apis. These aren't regular apis though, they're private interfaces that apps like amino and iFunny use.
The docs were written based on logging api calls and observing how they behave.
For any app / service added to this repo, it will be inside it's own folder, usually with a file called `docs.yml`. Docs will also be included, usually `docs.md`
Docs in this repo are generated with a tool called [`persim`](https://github.com/gastrodon/persim) that I wrote. You can use it if you'd like, but I have not gotten around to writing a proper install script.

57
amino/docs.md Normal file
View file

@ -0,0 +1,57 @@
<details>
<summary>GET /api/v1/g/s/auid/</summary>
GET an AUID for this device
__query strings__
|name|description|required|
| - | - | - |
|deviceId|Same as NDCDEVICEID|True|
__request_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|
</details>
<details>
<summary>POST /api/v1/g/s/device/</summary>
POST a device configuration
__request_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|
```JSON
{
"deviceID": "... <device id generated by the app>",
"bundleID": "com.narvii.amino.master <android app package?>",
"clientType": "100 <always 100>",
"timezone": "-300 <timezone number code>",
"systemPushEnabled": "true <true by default on new install>",
"locale": "en_US <locale string>",
"deviceToken": "... <device token generated by the app>",
"deviceTokenType": "1 <always 1?>",
"timestamp": "1579580530965 <request time in ms>"
}
```
__responses__
- 200 - Device configured
Device configured
The device config was accepted
</details>

62
amino/docs.yml Normal file
View file

@ -0,0 +1,62 @@
globals:
request_headers:
"*":
- name: NDCDEVICEID
description: The device id generated by the app. See
required: true
- name: NDC-MSG-SIG
description: Message signature (?) generated by the app
required: false
- name: SMDEVICEID
description: I don't know, seems to be a non-string hex number
required: false
vars:
request:
POST:
body:
post_device:
lang: JSON
content:
{
"deviceID": "... <device id generated by the app>",
"bundleID": "com.narvii.amino.master <android app package?>",
"clientType": "100 <always 100>",
"timezone": "-300 <timezone number code>",
"systemPushEnabled": "true <true by default on new install>",
"locale": "en_US <locale string>",
"deviceToken": "... <device token generated by the app>",
"deviceTokenType": "1 <always 1?>",
"timestamp": "1579580530965 <request time in ms>"
}
response_body:
POST:
post_device:
200:
lang: JSON
content:
{
"api:statuscode": "0 <0 is success>",
"api:duration": "0.034s <operation time>",
"api:message": "OK <more detailed status>",
"api:timestamp": "2020-01-21T04:22:13Z <server time>",
"devOptions": "null <?>"
}
routes:
/api/v1/g/s/device/:
POST:
description: POST a device configuration
body: $request.POST.body.post_device
responses:
200:
title: Device configured
description: The device config was accepted
body: $response_body.POST.post_device.200
/api/v1/g/s/auid/:
GET:
description: GET an AUID for this device
"query strings":
- name: deviceId
description: Same as NDCDEVICEID
required: true