File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed
Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 11"""
22This module contains the QueryClass, which serves as a base class for handling common API queries.
33
4- The QueryClass is designed to encapsulate shared functionality and attributes for subclasses that interact
5- with the TikTok API. It provides a reference to the parent Query instance, allowing subclasses to access
4+ The QueryClass is designed to encapsulate shared functionality and attributes for subclasses that interact
5+ with the TikTok API. It provides a reference to the parent Query instance, allowing subclasses to access
66authentication and endpoint information.
77
88Usage:
9- Subclasses can inherit from QueryClass to implement specific API query methods, ensuring
9+ Subclasses can inherit from QueryClass to implement specific API query methods, ensuring
1010 consistent handling of API requests and responses.
1111"""
1212
Original file line number Diff line number Diff line change 11"""
22Provides the `Query` class, which facilitates interaction with the TikTok API.
33
4- The `Query` class acts as a façade for accessing various underlying query classes that handle specific API requests.
5- To understand the available methods and functionalities, users should refer to the class variables that represent
4+ The `Query` class acts as a façade for accessing various underlying query classes that handle specific API requests.
5+ To understand the available methods and functionalities, users should refer to the class variables that represent
66these underlying query classes.
77
8- This class is designed to work with an OAuth2 authentication instance and an asynchronous HTTP client
9- to perform various API requests, such as retrieving user and playlist information. The module also handles
8+ This class is designed to work with an OAuth2 authentication instance and an asynchronous HTTP client
9+ to perform various API requests, such as retrieving user and playlist information. The module also handles
1010error logging and exception management.
1111
1212Usage:
1313 1. Authenticate using the `OAuth2` class:
14-
14+
1515 ```python
1616 from TikTok.Auth import OAuth2
1717 from TikTok.ValidationModels.OAuth2 import RequestHeadersModel, TokenRequestBodyModel
2626 ```
2727
2828 2. Instantiate the `Query` class with the authenticated `OAuth2` instance:
29-
29+
3030 ```python
3131 from TikTok.Query import Query
3232
3333 query = Query(auth)
3434 ```
3535
3636 3. Retrieve user information:
37-
37+
3838 ```python
3939 from TikTok.ValidationModels.User import UserInfoQueryFields
4040
5151 ```
5252
5353 4. Retrieve playlist information:
54-
54+
5555 ```python
5656 playlist_info = await query.playlist.info(
5757 playlist_id=123456,
You can’t perform that action at this time.
0 commit comments