Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: detect-private-key
- id: check-docstring-first
- id: debug-statements
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: 24.10.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.1.0
hooks:
- id: black
language_version: python3.12
Expand Down
6 changes: 3 additions & 3 deletions TikTok/Queries/Common.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""
This module contains the QueryClass, which serves as a base class for handling common API queries.

The QueryClass is designed to encapsulate shared functionality and attributes for subclasses that interact
with the TikTok API. It provides a reference to the parent Query instance, allowing subclasses to access
The QueryClass is designed to encapsulate shared functionality and attributes for subclasses that interact
with the TikTok API. It provides a reference to the parent Query instance, allowing subclasses to access
authentication and endpoint information.

Usage:
Subclasses can inherit from QueryClass to implement specific API query methods, ensuring
Subclasses can inherit from QueryClass to implement specific API query methods, ensuring
consistent handling of API requests and responses.
"""

Expand Down
16 changes: 8 additions & 8 deletions TikTok/Query.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
"""
Provides the `Query` class, which facilitates interaction with the TikTok API.

The `Query` class acts as a façade for accessing various underlying query classes that handle specific API requests.
To understand the available methods and functionalities, users should refer to the class variables that represent
The `Query` class acts as a façade for accessing various underlying query classes that handle specific API requests.
To understand the available methods and functionalities, users should refer to the class variables that represent
these underlying query classes.

This class is designed to work with an OAuth2 authentication instance and an asynchronous HTTP client
to perform various API requests, such as retrieving user and playlist information. The module also handles
This class is designed to work with an OAuth2 authentication instance and an asynchronous HTTP client
to perform various API requests, such as retrieving user and playlist information. The module also handles
error logging and exception management.

Usage:
1. Authenticate using the `OAuth2` class:

```python
from TikTok.Auth import OAuth2
from TikTok.ValidationModels.OAuth2 import RequestHeadersModel, TokenRequestBodyModel
Expand All @@ -26,15 +26,15 @@
```

2. Instantiate the `Query` class with the authenticated `OAuth2` instance:

```python
from TikTok.Query import Query

query = Query(auth)
```

3. Retrieve user information:

```python
from TikTok.ValidationModels.User import UserInfoQueryFields

Expand All @@ -51,7 +51,7 @@
```

4. Retrieve playlist information:

```python
playlist_info = await query.playlist.info(
playlist_id=123456,
Expand Down