class Status(object): def __init__(self): self.client = Client() self.uri = api_builder() def get_status(self, params=None): uri = self.uri.status.path() result = self.client.get(uri, params=params) return result def get_apiMetrics(self, params=None): uri = self.uri.admin.apiMetrics.path() result = self.client.get(uri, params=params) return result
class Explorer(object): def __init__(self): self.client = Client() self.uri = api_builder().explorer() def to_explorer(self, params=None): uri = self.uri.path() result = self.client.get(uri, params=params) return result
class Rankings(object): def __init__(self): self.client = Client() self.uri = api_builder().rankings() def get_rankings(self, params=None): uri = self.uri.path() result = self.client.get(uri, params=params) return result
class Distributions(object): def __init__(self): self.client = Client() self.uri = api_builder().distributions() def get_distributions(self): uri = self.uri.path() result = self.client.get(uri) return result
class Metadata(object): def __init__(self): self.client = Client() self.uri = api_builder().metadata() def get_metadata(self): uri = self.uri.path() result = self.client.get(uri) return result
class Search(object): def __init__(self): self.client = Client() self.uri = api_builder().search() def search(self, params=None): uri = self.uri.path() result = self.client.get(uri, params=params) return result
class Matches(object): def __init__(self, match_id=None): self.client = Client() self.match_id = match_id self.uri = api_builder().matches(int(self.match_id)) def get_match(self): uri = self.uri.path() match = self.client.get(uri) print(match) return match
class ProMatches(object): def __init__(self): self.client = Client() self.uri = api_builder().proMatches.path() def get_all(self, params={'less_than_match_id': None}): matches = self.client.get(self.uri, params) for match in matches: # TODO save data m = ProMatch(match) print(m) return matches
class ProPlayers(object): def __init__(self): self.client = Client() self.uri = api_builder().proPlayers.path() def get_all(self): players = self.client.get(self.uri) for player in players: # TODO save data p = ProPlayer(player) return players
def __init__(self): self.client = Client() self.uri = api_builder().distributions()
class Players(object): def __init__(self, account_id=None): self.client = Client() self.account_id = account_id self.root_uri = api_builder().players(int(self.account_id)) def get_player(self): uri = self.root_uri.path() player = self.client.get(uri) print(player) return player def get_player_wl(self, params=None): uri = self.root_uri.wl.path() player_wl = self.client.get(uri, params) print(player_wl) return player_wl def get_player_recentMatches(self): uri = self.root_uri.recentMatches.path() player_recentMatches = self.client.get(uri) print(player_recentMatches) return player_recentMatches def get_player_matches(self, params=None): uri = self.root_uri.matches.path() player_matches = self.client.get(uri, params) print(player_matches) return player_matches def get_player_heroes(self, params=None): uri = self.root_uri.heroes.path() player_heroes = self.client.get(uri, params) print(player_heroes) return player_heroes def get_player_peers(self, params=None): uri = self.root_uri.peers.path() player_peers = self.client.get(uri, params) print(player_peers) return player_peers def get_player_pros(self, params=None): uri = self.root_uri.pros.path() player_pros = self.client.get(uri, params) print(player_pros) return player_pros def get_player_totals(self, params=None): uri = self.root_uri.totals.path() player_totals = self.client.get(uri, params) print(player_totals) return player_totals def get_player_counts(self, params=None): uri = self.root_uri.totals.path() player_counts = self.client.get(uri, params) print(player_counts) return player_counts def get_player_histograms(self, field, params=None): uri = self.root_uri.histograms(field).path() player_histograms = self.client.get(uri, params) print(player_histograms) return player_histograms def get_player_wardmap(self, params=None): uri = self.root_uri.wardmap.path() player_wardmap = self.client.get(uri, params) print(player_wardmap) return player_wardmap def get_player_wordcloud(self, params=None): uri = self.root_uri.wordcloud.path() player_wordcloud = self.client.get(uri, params) print(player_wordcloud) return player_wordcloud def get_player_ratings(self): uri = self.root_uri.ratings.path() player_ratings = self.client.get(uri) print(player_ratings) return player_ratings def get_player_rankings(self): uri = self.root_uri.rankings.path() player_rankings = self.client.get(uri) print(player_rankings) return player_rankings def post_player_refesh(self): uri = self.root_uri.refresh.path() player_refresh = self.client.post(uri) print(player_refresh) return player_refresh
def __init__(self): self.client = Client() self.uri = api_builder().metadata()
def __init__(self, account_id=None): self.client = Client() self.account_id = account_id self.root_uri = api_builder().players(int(self.account_id))
def __init__(self): self.client = Client() self.uri = api_builder().rankings()
def __init__(self): self.client = Client() self.uri = api_builder().benchmarks()
def __init__(self): self.client = Client() self.uri = api_builder().explorer()
def __init__(self): self.client = Client() self.uri = api_builder().proMatches.path()
def __init__(self): self.client = Client() self.uri = api_builder().proPlayers.path()
def __init__(self): self.client = Client() self.uri = api_builder().health()
def __init__(self): self.client = Client() self.uri = api_builder().search()
def __init__(self, match_id=None): self.client = Client() self.match_id = match_id self.uri = api_builder().matches(int(self.match_id))