redditwarp.core.http_client_ASYNC
#
- class redditwarp.core.http_client_ASYNC.HTTPClient(handler: Handler, *, headers: MutableMapping[str, str] | None = None)[source]#
Bases:
HTTPClient
An HTTP client specialised for the purposes of this library.
- base_url: str#
- timeout: float#
- user_agent_base: str#
- headers: MutableMapping[str, str]#
- class redditwarp.core.http_client_ASYNC.RedditHTTPClient(handler: Handler, *, headers: MutableMapping[str, str] | None = None, authorizer: Authorizer | None = None)[source]#
Bases:
HTTPClient
An HTTP client for making requests to the public Reddit API.
- property authorizer: Authorizer#
- fetch_authorizer() Authorizer [source]#
- fast_set_authorizer(value: Authorizer | None) None [source]#
Changes the value of
self.authorizer
.Note, the
authorizer
attribute is just a holder and changing its value will not change the underlying authorizer.
- redditwarp.core.http_client_ASYNC.build_reddit_http_client(client_id: str, client_secret: str, grant: AuthorizationGrant, *, connector: Connector | None = None) RedditHTTPClient [source]#
- redditwarp.core.http_client_ASYNC.build_reddit_http_client_from_access_token(access_token: str, *, connector: Connector | None = None) RedditHTTPClient [source]#