-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to support TheGamesDB v2 api #252
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sselph
reviewed
Aug 19, 2019
Thanks for the hard work. I added some comments and questions. |
Updated the quick ones, commented on the others. I can still make those style changes you mentioned and add an API key if you provide one, otherwise I defer to you on merging this in. |
J-Swift
force-pushed
the
feature/gamesdb-v2-api-fix
branch
from
August 19, 2019 18:45
38a3dad
to
d92766d
Compare
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should address #230, #237, #244, and #245
TheGamesDB updated to a new api a while back and v2 is pretty different:
83cafde7c61f6f57f523241ca6abe58165cdc42c704ae0cd953a6846a9a463b6
)This is the initial conversion of the existing code to support the new version. It relies on a "temporary" swagger client I generated here, but there is a decent amount of hand cleanup to get to that point. See this issue I opened for more info. Once that is cleaned up, addressing future API updates should be fairly straightforward.
The new API supports batching which is great, but not currently implemented/supported in the codebase. I might tackle that next, as the API limits are not very generous (1500 req/month) and so batching is the only way a large initial scrape is going to work. I currently am making
4 + 2 * {number of games}
API requests per run of the scraper.Note I had to learn golang for this and so let me know if there are any issues with how I've coded it up.