Module pyreddit.services.imgur_service
Service for Imgur images and videos.
Classes
class Imgur-
Service for Imgur images and videos.
Ancestors
Class variables
var has_external_request : bool-
Inherited from:
Service.has_external_requestTrue if the service needs to reach out to an external http endpoint, False otherwise.
var is_authenticated : bool-
Inherited from:
Service.is_authenticatedTrue if the external request needs to be authenticated (i.e. with an Authorization header), False otherwise …
var access_token : Union[str, NoneType]-
Inherited from:
Service.access_tokenContains the access token for the OAuth authentication if present, None otherwise …
Static methods
def preprocess(url: str, data: Any) ‑> str-
Override of
Service.preprocess()method.Gets the media hash from the url and creates the accepted provider media url.
def get(url: str) ‑> requests.models.Response-
Override of
Service.get()method.Makes an API call with the client ID as authorization.
def postprocess(response) ‑> Media-
Override of
Service.postprocess()method.Creates the right media object based on the size of provider's media.
def authenticate() ‑> NoneType-
Inherited from:
Service.authenticateAuthenticate the service on the service provider API …
def get_media(url: str, data: Any) ‑> Media-
Inherited from:
Service.get_mediaEntrypoint of the class …