mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-21 03:13:51 +08:00
refactor(types): govern TMDb credit response contract
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
from ..tmdb import TMDb
|
||||
from ..tmdb import TMDb, TMDbJson
|
||||
|
||||
|
||||
class Credit(TMDb):
|
||||
"""按身份标识查询电影或剧集演职员详情。"""
|
||||
|
||||
_urls = {
|
||||
"details": "/credit/%s"
|
||||
}
|
||||
|
||||
def details(self, credit_id):
|
||||
def details(self, credit_id: int | str) -> TMDbJson:
|
||||
"""
|
||||
Get a movie or TV credit details by id.
|
||||
:param credit_id: int
|
||||
@@ -14,7 +16,7 @@ class Credit(TMDb):
|
||||
"""
|
||||
return self._request_obj(self._urls["details"] % credit_id)
|
||||
|
||||
async def async_details(self, credit_id):
|
||||
async def async_details(self, credit_id: int | str) -> TMDbJson:
|
||||
"""
|
||||
Get a movie or TV credit details by id.(异步版本)
|
||||
:param credit_id: int
|
||||
|
||||
Reference in New Issue
Block a user