chore(readme): add endpoints

This commit is contained in:
hansputera
2021-11-06 20:44:17 +07:00
parent 5fbaf012eb
commit d176009dd8
3 changed files with 28 additions and 1 deletions

View File

@@ -8,7 +8,7 @@
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 13,
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [

View File

@@ -32,6 +32,32 @@ This config is required if you want use `/api/search`.
2. Find `Environment Variables` button and click it.
3. Add environment variable with `SESSION` as the name, and your `sessionid` as a value.
## Endpoints
- **/api/ping:**
Send ping request to [TikTok](https://tiktok.com)
**Query requirements:** -
- **/api/search:**
> `SESSION` needed.
Search trending topic and videos about `x`
**Query requirements:**
- `q`: Keyword you want to search. (eg. `Naruto`)
- `t`: Searching type (`trend` for trending topic or `cards` for videos and user(s) information)
**Example:** `/api/search?q=Boruto&t=cards`
- **/api/download:**
Get tiktok video without watermark!
**Query requirements:**
- `url`: TikTok Video URL. (eg. `https://www.tiktok.com/@vanessaangelnih/video/7006671762352016666`)
## Credits
- [SnapTik](https://snaptik.app) `Non-Watermark Video Source`

View File

@@ -6,6 +6,7 @@ export default async (_: VercelRequest, res: VercelResponse) => {
'endpoints': {
'ping': '/api/ping',
'search': '/api/search',
'download': '/api/download',
},
});
};