Skip to content
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

Feature Request: Connect to GitHub API using credentials/OAuth to increase hourly API limit #134

Open
dylHall opened this issue Mar 25, 2018 · 1 comment
Labels

Comments

@dylHall
Copy link
Contributor

dylHall commented Mar 25, 2018

Feature Request Information

#40 has been pulled in to master, and has added the ability for researchers to add new participants by sending a request to the GitHub API with optional search terms.

However, the GitHub API imposes rate limits on its API - the current implementation is connected to anonymously, which means there's a limit of 60 API calls per hour. This poses a problem for when a researcher tries to queue up large requests - as constructing a single participant can require multiple API queries.

I suggest that we add the ability for QualOpt to authenticate with the GitHub API, as this would increase the hourly API limit to 5000 per hour.

Additionally, we should add a way of displaying the current API limit if we use an OAuth token across the entire project (current implementation has individual connections, thus the API limit is not shared).

Technical Details

Information regarding rate limiting can be found from these links:
https://developer.github.com/v3/rate_limit/
https://developer.github.com/v3/#rate-limiting

To see the rate limit in action, make a request by clicking on the "Send GitHub API Query" button on the Participants page, and then look at the console running the backend. There will be printouts showing the current limit, max limit and when the hourly reset will occur
image

The place to make the change will be in the GitHubResource.java file, either passing in some form of authentication from the call at the frontend, or having some set OAuth in the backend.

Work Estimation

The GitHub domain model has methods available for authenticated connections (refer to http://github-api.kohsuke.org/apidocs/index.html for javadocs, specifically on the GitHub object), but because there will be both frontend and backend components to this work, I'd estimate this feature request to be of medium size.

@softeng-701
Copy link
Collaborator

@dylHall APPROVED!

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

No branches or pull requests

2 participants