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

Switch back to REST API for getting repo contents #4

Open
caleb15 opened this issue Feb 11, 2021 · 0 comments
Open

Switch back to REST API for getting repo contents #4

caleb15 opened this issue Feb 11, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@caleb15
Copy link
Contributor

caleb15 commented Feb 11, 2021

GraphQL requires a github token but REST API does not, assuming that you don't spam the API. I used graphql because I thought I just wanted the filename and the REST API provided a bunch of other info. In hindsight it was not worth the extra development time getting graphql working and the (admittedly small) burden upon the user to supply to the token. Also it turns out I needed the type as well to make sure I didn't accidentily match a folder named "CHANGES".

Ex: https://api.github.com/repos/celery/celery/contents/
docs: https://docs.github.com/en/rest/reference/repos#contents
Stackoverflow: https://stackoverflow.com/questions/38449371/github-api-check-if-a-file-exists-and-then-get-it-if-it-does

@caleb15 caleb15 changed the title Switch to REST API for getting repo contents Switch back to REST API for getting repo contents Feb 11, 2021
@caleb15 caleb15 added enhancement New feature or request good first issue Good for newcomers labels Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant