Trakt Core

Objects, properties, and methods to be shared across other modules in the trakt package

class trakt.core.Airs(day, time, timezone)
day

Alias for field number 0

time

Alias for field number 1

timezone

Alias for field number 2

class trakt.core.Alias(title, country)
country

Alias for field number 1

title

Alias for field number 0

class trakt.core.Comment(id, parent_id, created_at, comment, spoiler, review, replies, user, updated_at, likes, user_rating)
comment

Alias for field number 3

created_at

Alias for field number 2

id

Alias for field number 0

likes

Alias for field number 9

parent_id

Alias for field number 1

replies

Alias for field number 6

review

Alias for field number 5

spoiler

Alias for field number 4

updated_at

Alias for field number 8

user

Alias for field number 7

user_rating

Alias for field number 10

class trakt.core.Genre(name, slug)
name

Alias for field number 0

slug

Alias for field number 1

trakt.core.init(*args, **kwargs)

Run the auth function specified by AUTH_METHOD

trakt.core.BASE_URL = 'https://api-v2launch.trakt.tv/'

The base url for the Trakt API. Can be modified to run against different Trakt.tv environments

trakt.core.CLIENT_ID = None

The Trakt.tv OAuth Client ID for your OAuth Application

trakt.core.CLIENT_SECRET = None

The Trakt.tv OAuth Client Secret for your OAuth Application

trakt.core.REDIRECT_URI = 'urn:ietf:wg:oauth:2.0:oob'

The OAuth2 Redirect URI for your OAuth Application

trakt.core.HEADERS = {'trakt-api-version': '2', 'Content-Type': 'application/json'}

Default request HEADERS

trakt.core.CONFIG_PATH = '/home/docs/.pytrakt.json'

Default path for where to store your trakt.tv API authentication information

trakt.core.OAUTH_TOKEN = None

Your personal Trakt.tv OAUTH Bearer Token

trakt.core.PIN_AUTH = 'PIN'

Flag used to enable Trakt PIN authentication

trakt.core.OAUTH_AUTH = 'OAUTH'

Flag used to enable Trakt OAuth authentication

trakt.core.AUTH_METHOD = 'PIN'

The currently enabled authentication method. Default is PIN_AUTH

trakt.core.APPLICATION_ID = None

The ID of the application to register with, when using PIN authentication