Skip to content

Commit

Permalink
removed depraced get_streams_metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Teekeks committed Oct 9, 2020
1 parent 99fb5bf commit d91767c
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions twitchAPI/twitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,49 +957,6 @@ def get_stream_markers(self,
result = self.__api_get_request(url, AuthType.USER, [AuthScope.USER_READ_BROADCAST])
return make_fields_datetime(result.json(), ['created_at'])

def get_streams_metadata(self,
after: Optional[str] = None,
before: Optional[str] = None,
first: int = 20,
game_id: Optional[List[str]] = None,
language: Optional[List[str]] = None,
user_id: Optional[List[str]] = None,
user_login: Optional[List[str]] = None) -> dict:
"""Requires no authentication.\n
For detailed documentation, see here: https://dev.twitch.tv/docs/api/reference#get-streams-metadata
:param after: optional str
:param before: optional str
:param first: optional int in range between 1 and 100
:param game_id: optional list of str with maximum 100 entries
:param language: optional list of str with maximum 100 entries
:param user_id: optional list of str with maximum 100 entries
:param user_login: optional list str with maximum 100 entries
:rtype: dict
"""
if first < 1 or first > 100:
raise Exception('first must be between 1 and 100')
if game_id is not None and len(game_id) > 100:
raise Exception('game_id can have a maximum of 100 entries')
if language is not None and len(language) > 100:
raise Exception('language can have a maximum of 100 entries')
if user_id is not None and len(user_id) > 100:
raise Exception('user_id can have a maximum of 100 entries')
if user_login is not None and len(user_login) > 100:
raise Exception('user_login can have a maximum of 100 entries')
param = {
'after': after,
'before': before,
'first': first,
'game_id': game_id,
'language': language,
'user_id': user_id,
'user_login': user_login
}
url = build_url(TWITCH_API_BASE_URL + 'streams/metadata', param, remove_none=True, split_lists=True)
result = self.__api_get_request(url, AuthType.NONE, [])
return result.json()

def get_broadcaster_subscriptions(self,
broadcaster_id: str,
user_ids: Optional[List[str]] = None) -> dict:
Expand Down

0 comments on commit d91767c

Please sign in to comment.