Module pyreddit.services.gfycat_service

Service for Gfycat GIFs.

Classes

class Gfycat

Service for Gfycat GIFs.

Notes

This is an authenticated OAuth service.

Ancestors

Class variables

var is_authenticated : bool

Inherited from: Service.is_authenticated

True if the external request needs to be authenticated (i.e. with an Authorization header), False otherwise …

var has_external_request : bool

Inherited from: Service.has_external_request

True if the service needs to reach out to an external http endpoint, False otherwise.

var access_token : Union[str, NoneType]

Inherited from: Service.access_token

Contains 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.

Extracts the gfycat Id from the url and constructs the provider url.

def get(url: str) ‑> requests.models.Response

Override of Service.get() method.

Makes a call to the provider's API.

def postprocess(response) ‑> Media

Override of Service.postprocess() method.

Returns the media url which respects the API file limits, if present.

def authenticate() ‑> NoneType

Override of Service.authenticate() method.

Authenticates the service through OAuth.

def get_media(url: str, data: Any) ‑> Media

Inherited from: Service.get_media

Entrypoint of the class …