Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
Moldachev Sergey committed Oct 24, 2021
0 parents commit ff49ce8
Show file tree
Hide file tree
Showing 23 changed files with 1,162 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea
build
dist
tokapi_client.egg-info
21 changes: 21 additions & 0 deletions LICENSE
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.
13 changes: 13 additions & 0 deletions Pipfile
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"
157 changes: 157 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions README.md
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.
Loading

0 comments on commit ff49ce8

Please sign in to comment.