-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Moldachev Sergey
committed
Oct 24, 2021
0 parents
commit ff49ce8
Showing
23 changed files
with
1,162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.idea | ||
build | ||
dist | ||
tokapi_client.egg-info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Live Code Stream | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[[source]] | ||
url = "https://pypi.python.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
httpx = "*" | ||
|
||
[dev-packages] | ||
pytest = "*" | ||
|
||
[requires] | ||
python_version = "3.9" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!-- markdownlint-disable MD013 --> | ||
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/mtokapi/tokapi-client/issues) | ||
<!-- markdownlint-enable MD013 --> | ||
|
||
The simple http client for [TokApi](https://rapidapi.com/Sonjik/api/tokapi-mobile-version) tiktok mobile API | ||
|
||
## Installation | ||
|
||
```shell | ||
pip install tokapi-client | ||
``` | ||
|
||
## Usage | ||
|
||
```shell | ||
api = TokApi('YOUR_RAPID_API_KEY') | ||
|
||
# Let's find some users by search query with pagination | ||
keyword = 'nike' | ||
offset = 0 | ||
for i in range(0, 3): | ||
result = api.search_user_by_keyword(keyword, offset=offset) | ||
data = result.json() | ||
|
||
for user in data['user_list']: | ||
info = user['user_info'] | ||
print('Nickname: {}, region: {}'.format(info['nickname'], | ||
info['region'])) | ||
|
||
offset = data['cursor'] | ||
``` | ||
## Examples | ||
You can find more complex usage examples in [examples](examples) folder | ||
## Legal | ||
This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by TikTok | ||
or any of its affiliates or subsidiaries. This is an independent and unofficial API. Use at your own risk. |
Oops, something went wrong.