From 1e283771f325fc25d53eee0039f803b666d107b9 Mon Sep 17 00:00:00 2001 From: Zero Date: Tue, 21 Jan 2020 17:06:22 -0500 Subject: [PATCH] first commit --- .gitignore | 0 README.md | 10 ++++++++ amino/docs.md | 57 ++++++++++++++++++++++++++++++++++++++++++++++ amino/docs.yml | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 129 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 amino/docs.md create mode 100644 amino/docs.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..04d1050 --- /dev/null +++ b/README.md @@ -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. diff --git a/amino/docs.md b/amino/docs.md new file mode 100644 index 0000000..ed94b23 --- /dev/null +++ b/amino/docs.md @@ -0,0 +1,57 @@ +
+GET /api/v1/g/s/auid/ +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| + + +
+ + +
+POST /api/v1/g/s/device/ +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": "... ", + "bundleID": "com.narvii.amino.master ", + "clientType": "100 ", + "timezone": "-300 ", + "systemPushEnabled": "true ", + "locale": "en_US ", + "deviceToken": "... ", + "deviceTokenType": "1 ", + "timestamp": "1579580530965 " +} +``` + +__responses__ + +- 200 - Device configured +Device configured + +The device config was accepted + + +
diff --git a/amino/docs.yml b/amino/docs.yml new file mode 100644 index 0000000..e0f4a8d --- /dev/null +++ b/amino/docs.yml @@ -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": "... ", + "bundleID": "com.narvii.amino.master ", + "clientType": "100 ", + "timezone": "-300 ", + "systemPushEnabled": "true ", + "locale": "en_US ", + "deviceToken": "... ", + "deviceTokenType": "1 ", + "timestamp": "1579580530965 " + } + response_body: + POST: + post_device: + 200: + lang: JSON + content: + { + "api:statuscode": "0 <0 is success>", + "api:duration": "0.034s ", + "api:message": "OK ", + "api:timestamp": "2020-01-21T04:22:13Z ", + "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