Files
MoviePilot/app/modules/themoviedb/tmdbv3api/objs/collection.py
Attente 0f0c3e660b style: 清理空白字符
移除代码中的 trailing whitespace 和空行缩进, 提升代码整洁度
2025-06-29 22:49:58 +08:00

34 lines
946 B
Python

from ..tmdb import TMDb
class Collection(TMDb):
_urls = {
"details": "/collection/%s",
"images": "/collection/%s/images",
"translations": "/collection/%s/translations"
}
def details(self, collection_id):
"""
Get collection details by id.
:param collection_id: int
:return:
"""
return self._request_obj(self._urls["details"] % collection_id, key="parts")
def images(self, collection_id):
"""
Get the images for a collection by id.
:param collection_id: int
:return:
"""
return self._request_obj(self._urls["images"] % collection_id)
def translations(self, collection_id):
"""
Get the list translations for a collection by id.
:param collection_id: int
:return:
"""
return self._request_obj(self._urls["translations"] % collection_id, key="translations")