redditwarp.core.http_client_SYNC#
- class redditwarp.core.http_client_SYNC.HTTPClient(handler: Handler, *, headers: MutableMapping[str, str] | None = None)[source]#
Bases:
HTTPClientAn 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_SYNC.RedditHTTPClient(handler: Handler, *, headers: MutableMapping[str, str] | None = None, authorizer: Authorizer | None = None)[source]#
Bases:
HTTPClientAn 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
authorizerattribute is just a holder and changing its value will not change the underlying authorizer.
- redditwarp.core.http_client_SYNC.build_reddit_http_client(client_id: str, client_secret: str, grant: Mapping[str, str]) RedditHTTPClient[source]#
- redditwarp.core.http_client_SYNC.build_reddit_http_client_from_access_token(access_token: str) RedditHTTPClient[source]#