本文整理汇总了Python中trakt.mapper.summary.SummaryMapper类的典型用法代码示例。如果您正苦于以下问题:Python SummaryMapper类的具体用法?Python SummaryMapper怎么用?Python SummaryMapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SummaryMapper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
def get(self, id):
response = self.http.get(
str(id)
)
return SummaryMapper.show(
self.get_data(response)
)
示例2: season
def season(self, id, season):
response = self.http.get(str(id), [
'seasons', str(season)
])
return SummaryMapper.episodes(
self.get_data(response)
)
示例3: seasons
def seasons(self, id):
response = self.http.get(str(id), [
'seasons'
])
return SummaryMapper.seasons(
self.get_data(response)
)
示例4: trending
def trending(self, **kwargs):
response = self.http.get('trending', query=dict(**popitems(kwargs, ['extended', 'limit'])))
items = self.get_data(response, **kwargs)
if isinstance(items, requests.Response):
return items
return SummaryMapper.shows(self.client, items)
示例5: get
def get(self, id, **kwargs):
response = self.http.get(str(id), query=dict(**popitems(kwargs, ['extended', 'limit'])))
item = self.get_data(response, **kwargs)
if isinstance(item, requests.Response):
return item
return SummaryMapper.show(self.client, item)
示例6: trending
def trending(self):
response = self.http.get(
'trending'
)
return SummaryMapper.movies(
self.client,
self.get_data(response)
)
示例7: season
def season(self, id, season, **kwargs):
response = self.http.get(str(id), [
'seasons', str(season)
])
return SummaryMapper.episodes(
self.client,
self.get_data(response, **kwargs)
)
示例8: get
def get(self, id, **kwargs):
response = self.http.get(
str(id)
)
return SummaryMapper.show(
self.client,
self.get_data(response, **kwargs)
)
示例9: trending
def trending(self, **kwargs):
response = self.http.get(
'trending'
)
return SummaryMapper.shows(
self.client,
self.get_data(response, **kwargs)
)
示例10: seasons
def seasons(self, id, **kwargs):
response = self.http.get(str(id), [
'seasons'
])
return SummaryMapper.seasons(
self.client,
self.get_data(response, **kwargs)
)
示例11: episode
def episode(self, id, season, episode):
response = self.http.get(str(id), [
'seasons', str(season),
'episodes', str(episode)
])
return SummaryMapper.episode(
self.get_data(response)
)
示例12: get
def get(self, id, **kwargs):
response = self.http.get(
str(id)
)
# Parse response
return SummaryMapper.movie(
self.client,
self.get_data(response, **kwargs)
)
示例13: seasons
def seasons(self, id, extended=None, **kwargs):
response = self.http.get(str(id), [
'seasons'
], query={
'extended': extended
})
return SummaryMapper.seasons(
self.client,
self.get_data(response, **kwargs)
)
示例14: trending
def trending(self, extended=None, **kwargs):
response = self.http.get('trending', query={
'extended': extended
})
items = self.get_data(response, **kwargs)
if isinstance(items, requests.Response):
return items
return SummaryMapper.shows(self.client, items)
示例15: get
def get(self, id, extended=None, **kwargs):
response = self.http.get(str(id), query={
'extended': extended
})
item = self.get_data(response, **kwargs)
if isinstance(item, requests.Response):
return item
return SummaryMapper.show(self.client, item)