fix tmdbapis

This commit is contained in:
jxxghp
2023-07-29 13:09:36 +08:00
parent e4992ea574
commit d76fe5c039
37 changed files with 2660 additions and 28 deletions

View File

@ -0,0 +1,33 @@
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")