728x90
반응형
[MLB Stats API] 파이썬 패키지로 MLB Stats API 사용해보기
- 지정된 endpoint에 둘 이상의 고유 매개변수가 필요한 경우
(예: teamId, legueId 또는 legueListId 중 하나가 endpoint에 포함되어야 함) - 필요 매개변수 목록에는 각 요구사항 집합에 대한 하위 목록이 포함됨
예시 : awards 엔드포인트에 필요한 매개변수들과 하위목록에 대한 설명
statsapi.notes('awards')
>>>
"Endpoint: awards \nAll path parameters: ['ver', 'awardId', 'recipients']. \nRequired path parameters (note: ver will be included by default): ['ver']. \nAll query parameters: ['sportId', 'leagueId', 'season', 'hydrate', 'fields']. \nRequired query parameters: None. \nThe hydrate function is supported by this endpoint. Call the endpoint with {'hydrate':'hydrations'} in the parameters to return a list of available hydrations. For example, statsapi.get('schedule',{'sportId':1,'hydrate':'hydrations','fields':'hydrations'})\nDeveloper notes: Call awards endpoint with no parameters to return a list of awardIds."
728x90