diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 02ce0fb..11b4cca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/TikTok/Queries/Common.py b/TikTok/Queries/Common.py index 09d93e4..c11adc2 100644 --- a/TikTok/Queries/Common.py +++ b/TikTok/Queries/Common.py @@ -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. """ diff --git a/TikTok/Query.py b/TikTok/Query.py index dd8726b..c6338b1 100644 --- a/TikTok/Query.py +++ b/TikTok/Query.py @@ -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 @@ -26,7 +26,7 @@ ``` 2. Instantiate the `Query` class with the authenticated `OAuth2` instance: - + ```python from TikTok.Query import Query @@ -34,7 +34,7 @@ ``` 3. Retrieve user information: - + ```python from TikTok.ValidationModels.User import UserInfoQueryFields @@ -51,7 +51,7 @@ ``` 4. Retrieve playlist information: - + ```python playlist_info = await query.playlist.info( playlist_id=123456,