Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Added Current Game API #1

Merged
merged 2 commits into from
Feb 13, 2015
Merged

Added Current Game API #1

merged 2 commits into from
Feb 13, 2015

Conversation

lucasfevi
Copy link
Contributor

I added the Current Game API that riot recently released. The url of this nem API uses a platformId for each regions, and I couldn't find a better way than the switch depending on the region.

Also, the commit 4bce052 updates the util._get method to handle with 404 error, which sometimes didn't come as a json but as an HTML page.

emmorts added a commit that referenced this pull request Feb 13, 2015
@emmorts emmorts merged commit 2f69126 into emmorts:master Feb 13, 2015
@emmorts
Copy link
Owner

emmorts commented Feb 13, 2015

Thank you for your contribution 👍

@martinjms
Copy link

it may be better to have something like:

platformsIDs = {
'br': 'BR1',
'na': 'NA1',
'lan': 'LA1',
'las': 'LA2',
'oce': 'OC1',
'eune': 'EUN1',
'euw': 'EUW1',
'tr': 'TR1',
'ru': 'RU',
'kr': 'KR'
};

platformisIds['na'];

So you can store it on DB or a json file.

2015-02-13 16:02 GMT-03:00 Tomas Stropus notifications@github.com:

Thank you for your contribution [image: 👍]


Reply to this email directly or view it on GitHub
#1 (comment).

@lucasfevi
Copy link
Contributor Author

@martinjms Yeah probably your idea is better.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants