Skip to content

Commit

Permalink
Added the construct and get_ids methods to the TraktClient class
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzeman committed Oct 5, 2018
1 parent 1157f31 commit 772ada5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions trakt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from trakt.core.configuration import ConfigurationManager
from trakt.core.emitter import Emitter
from trakt.core.http import HttpClient
from trakt.mapper.core.base import Mapper
from trakt.interfaces import construct_map
from trakt.interfaces.base import InterfaceProxy
from trakt.version import __version__
Expand Down Expand Up @@ -45,6 +46,13 @@ def site_url(self):
def site_url(self, value):
self._site_url = value

def construct(self, media, item, keys=None, **kwargs):
return Mapper.construct(self, media, item, keys, **kwargs)

@staticmethod
def get_ids(media, item, parent=None):
return Mapper.get_ids(media, item, parent)

def __getitem__(self, path):
parts = path.strip('/').split('/')

Expand Down

0 comments on commit 772ada5

Please sign in to comment.