video_utils.videotagger.api package

Submodules

video_utils.videotagger.api.keys module

API Key handler for TMDb and TVDb

class video_utils.videotagger.api.keys.Keys

Bases: object

Class to store API key info for TVDb and TMDb

property TMDb_API_KEY

Return API key for TMDb

property TMDb_API_TOKEN

Return API token for TMDb

property TVDb_API_KEY

Return API key for TVDb

property TVDb_API_TOKEN

Return API token for TVDb

property TVDb_USERKEY

Return userkey for TVDb

property TVDb_USERNAME

Return username for TVDb

video_utils.videotagger.api.utils module

Base API class for TVDb and TMDb

video_utils.videotagger.api.utils.convert_date(info: dict) dict

Function to convert any date information into a datetime object

Parameters:

info (dict) – JSON response data from TMDb or TVDb API

Keyword Arguments:

None

Returns:

Updated info dictionary where date strings have been

converted to datetime objects

Return type:

dict

Module contents

Base API class for TVDb and TMDb

class video_utils.videotagger.api.BaseAPI(*args, **kwargs)

Bases: object

BaseAPI class for interacting with TMDb and TVDb APIs

TIMEOUT = 600.0
TMDb_URLBase = 'https://api.themoviedb.org/3'
TMDb_URLEpisode = 'https://api.themoviedb.org/3/tv/{}/season/{}/episode/{}'
TMDb_URLFind = 'https://api.themoviedb.org/3/find/{}'
TMDb_URLImage = 'https://image.tmdb.org/t/p/original/{}'
TMDb_URLMovie = 'https://api.themoviedb.org/3/movie/{}'
TMDb_URLPerson = 'https://api.themoviedb.org/3/person/{}'
TMDb_URLSearch = 'https://api.themoviedb.org/3/search/multi'
TMDb_URLSeason = 'https://api.themoviedb.org/3/tv/{}/season/{}'
TMDb_URLSeries = 'https://api.themoviedb.org/3/tv/{}'
TVDb_URLBase = 'https://api4.thetvdb.com/v4'
TVDb_URLEpisode = '{}/episodes/{}'
TVDb_URLImage = 'https://api4.thetvdb.com/v4/artwork/{}'
TVDb_URLMovie = 'https://api4.thetvdb.com/v4/movies/{}'
TVDb_URLSearch = 'https://api4.thetvdb.com/v4/search'
TVDb_URLSeries = 'https://api4.thetvdb.com/v4/series/{}'
property tvdb