Module pyreddit.services.generic_service

Service for when a suitable specific service is not found.

Classes

class Generic

Service for when a suitable specific service is not found.

Ancestors

Class variables

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 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 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 postprocess(response) ‑> Media

Override of Service.postprocess() method.

def preprocess(url: str, data: Any) ‑> str

Inherited from: Service.preprocess

Preprocess the media URL coming from Reddit json …

def get(url: str) ‑> Union[requests.models.Response, str]

Inherited from: Service.get

Get the media information …

def authenticate() ‑> NoneType

Inherited from: Service.authenticate

Authenticate the service on the service provider API …

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

Inherited from: Service.get_media

Entrypoint of the class …