Example #1
0
    def get_all(self, limit=10, offset=0):
        if limit > 100:
            raise TwitchAttributeException(
                'Maximum number of objects returned in one request is 100')

        params = {'limit': limit, 'offset': offset}
        response = self._request_get('teams', params=params)
        return [Team.construct_from(x) for x in response['teams']]
Example #2
0
    def get_all(self, limit=10, offset=0):
        if limit > 100:
            raise TwitchAttributeException(
                "Maximum number of objects returned in one request is 100")

        params = {"limit": limit, "offset": offset}
        response = self._request_get("teams", params=params)
        return [Team.construct_from(x) for x in response["teams"]]
Example #3
0
 def get(self, team_name):
     response = self._request_get('teams/{}'.format(team_name))
     return Team.construct_from(response)
Example #4
0
 def get_teams(self, channel_id):
     response = self._request_get('channels/{}/teams'.format(channel_id))
     return [Team.construct_from(x) for x in response['teams']]
Example #5
0
 def get(self, team_name):
     response = self._request_get('teams/%s' % team_name)
     return Team.construct_from(response)