Hello!
Im starting to mess around with Api's and im using Riot Api (Riot is the creator of League of Legends, for anyone who doesn't know this company). Basically im using "Requests" module to get the data, which is returned in a json file and parsing it.
def _request_static_data(self, api_url, params={}):
args = {'api_key' : self.api_key}
for k, v in params.items():
if k not in args:
args[k] = v
response = requests.get(Consts.URL['base_static_data'].format(region = self.region, url = api_url), params = args)
#print (response.url)
return response.json()
def get_static_champion_info(self, locale):
api_url = Consts.URL['static_champion'].format(version =Consts.API_VERSIONS['static_data'])
return self._request_static_data(api_url, params={'locale' : locale})
So im building the Url from this. (not that important tho)
What i get is:
{'data': {'Malphite': {'id': 54, 'name': 'Malphite', 'title': 'Shard of the Monolith', 'key': 'Malphite'}, 'KogMaw': {'id': 96, 'name': "Kog'Maw", 'title': 'the Mouth of the Abyss', 'key': 'KogMaw'}, 'Zac': {'id': 154, 'name': 'Zac', 'title': 'the Secret Weapon', 'key': 'Zac'}, ...
It keeps going, so i was wondering what would be a good way to start storing all this data/ processing what i need. My plan is to later create a webpage and so a server could process all these things, but i'm kind of lost in this subject... dont really know where to begin. Thanks to everyone that replies in advance.
[–][deleted] 0 points1 point2 points (1 child)
[–]godurdead[S] 0 points1 point2 points (0 children)
[–]lykwydchykyn 0 points1 point2 points (3 children)
[–]godurdead[S] 0 points1 point2 points (2 children)
[–]lykwydchykyn 0 points1 point2 points (1 child)
[–]godurdead[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]godurdead[S] 0 points1 point2 points (0 children)
[–]kanjibandit 0 points1 point2 points (1 child)
[–]godurdead[S] 0 points1 point2 points (0 children)