Comparing version 2.0.1 to 2.0.2
40
api.js
@@ -215,2 +215,22 @@ const Wrape = require("wrape"); | ||
}, | ||
likes: { | ||
help: "Get liked posts of an user", | ||
path: "/public/likes", | ||
params: { | ||
secUid: { | ||
required: true, | ||
validate: "^(.*?){30,}$", | ||
help: "The user secUid", | ||
example: "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud" | ||
}, | ||
count: { | ||
example: 5, | ||
default: 30, | ||
validate: "^[0-9]{1,2}$" | ||
}, | ||
cursor: { | ||
validate: "^[0-9]+$" | ||
} | ||
}, | ||
}, | ||
video: { | ||
@@ -653,3 +673,3 @@ path: "/public/video", | ||
followers: { | ||
help: "Get followers list", | ||
help: "[Deprecated] Get followers list", | ||
path: "/user/followers", | ||
@@ -1292,4 +1312,4 @@ params: { | ||
}, | ||
videos: { | ||
path: "/creator/analytics/videos", | ||
content: { | ||
path: "/creator/analytics/content", | ||
params: { | ||
@@ -1303,2 +1323,16 @@ days: { | ||
}, | ||
video: { | ||
path: "/creator/analytics/video", | ||
params: { | ||
days: { | ||
default: 7, | ||
validate: "^[0-9]+$" | ||
}, | ||
mediaId: { | ||
required: true, | ||
validate: "^[0-9]+$" | ||
} | ||
}, | ||
example_response: "{...}" | ||
}, | ||
followers: { | ||
@@ -1305,0 +1339,0 @@ path: "/creator/analytics/followers", |
{ | ||
"name": "tikapi", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "An fully managed unofficial TikTok app with OAuth capabilities", | ||
@@ -5,0 +5,0 @@ "main": "api.js", |
@@ -19,5 +19,13 @@ # Unofficial TikTok API | ||
await api.public.user({ | ||
username: 'lilyachty' | ||
}); | ||
(async () => { | ||
try { | ||
var user_information = await api.public.user({ | ||
username: 'lilyachty' | ||
}); | ||
console.log(user_information); | ||
} catch (error) { | ||
console.log(error); | ||
} | ||
})(); | ||
``` | ||
@@ -27,3 +35,3 @@ | ||
SDK And Documenation made with https://github.com/elis-k/wrape | ||
SDK And Documentation made with https://github.com/elis-k/wrape | ||
@@ -34,2 +42,3 @@ - [public](#api-public) | ||
- [posts](#api-public-posts) | ||
- [liked](#api-public-likes) | ||
- [video](#api-public-video) | ||
@@ -75,3 +84,4 @@ - [discover](#api-public-discover) | ||
- [overview](#api-user-analytics-overview) | ||
- [videos](#api-user-analytics-videos) | ||
- [content](#api-user-analytics-videos) | ||
- [video](#api-user-analytics-video) | ||
- [followers](#api-user-analytics-followers) | ||
@@ -321,2 +331,25 @@ - [live](#api-user-analytics-live) | ||
<h3 id="api-public-likes">Liked</h3> | ||
Get liked posts of an user | ||
```javascript | ||
api.public.likes({ | ||
secUid: "MS4wLjABAAAAsHntXC3s0AvxcecggxsoVa4eAiT8OVafVZ4OQXxy-9htpnUi0sOYSr0kGGD1Loud", //required | Validate: ^(.*?){30,}$ | ||
//count: 5, //optional | Validate: ^[0-9]{1,2}$ | ||
//cursor: "<any>", //optional | Validate: ^[0-9]+$ | ||
}) | ||
``` | ||
<details> | ||
<summary>Request</summary> | ||
**GET** /public/likes | ||
|Parameter|Location|Required|Description| | ||
|--|--|--|--| | ||
secUid|query|true|The user secUid | ||
count|query|false| | ||
cursor|query|false| | ||
</details> | ||
<h3 id="api-public-video">Video</h3> | ||
@@ -1657,3 +1690,3 @@ | ||
<h4 id="api-user-analytics-videos">Videos</h4> | ||
<h4 id="api-user-analytics-videos">Content</h4> | ||
@@ -1683,2 +1716,28 @@ ```javascript | ||
<h4 id="api-user-analytics-video">Video</h4> | ||
```javascript | ||
user.analytics.video({ | ||
mediaId: 690000000000000, //TikTok video ID | Required | ||
//days: 7, //optional | Validate: ^[0-9]+$ | ||
}) | ||
``` | ||
<details> | ||
<summary>Request</summary> | ||
**GET** /creator/analytics/videos | ||
|Parameter|Location|Required|Description| | ||
|--|--|--|--| | ||
days|query|false| | ||
</details> | ||
<details> | ||
<summary>Response</summary> | ||
```json | ||
{...} | ||
``` | ||
</details> | ||
<h4 id="api-user-analytics-followers">Followers</h4> | ||
@@ -1685,0 +1744,0 @@ |
82382
1358
1788