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

small. changes to simplify code + fix zero return error to warning #90

Merged
merged 7 commits into from
Jan 7, 2021
Merged

small. changes to simplify code + fix zero return error to warning #90

merged 7 commits into from
Jan 7, 2021

Conversation

drmowinckels
Copy link
Member

Rather than throwing an error when zero records are found, throw a warning and return invisible NULL.
Makes is possible to run with apply's without erroring.

Also, small changes to the code for simplification:

  • replace if statement in get events for checking event_status to match.arg
  • change so that httr:GET path argument is used to collate api url and api_method, rather than pasting before.

One test is still failing, but I dont really understand vcr, so I'm not able to figure out what is going on.

@maelle maelle merged commit d3fa6ea into rladies:noninteractive Jan 7, 2021
@ledell
Copy link
Member

ledell commented Jan 10, 2021

Thanks @Athanasiamo! Tagging the associated issue here since it has not been tagged already: #89

I see you changed the name of the api_url arg to api_method since we only store the partial URL now (is that right? or maybe there's a different reason). We store something like "rladies-nashville/events" in that variable.

Would the technical term for that be "API endpoint" or "API path" (e.g. api_endpoint, api_path)? I don't know if "endpoint" can refer to the whole URL and/or just the suffix. I think that (HTTP) "method" would refer to the type of API interaction (GET, POST, DELETE), so I wonder if it makes sense to call api_method something slightly different.

cc @maelle

@drmowinckels
Copy link
Member Author

@ledell , @maelle and I have also discussed the renaming of api_method since its not what you think it is by its name.
We decided the PR was already too large and that we wanted to do this in a separate step, to make it a little cleaner. I think I like the term api_path but dont know what would be the most intuitive.

@ledell
Copy link
Member

ledell commented Jan 11, 2021

@Athanasiamo I think api_path makes sense!

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

Successfully merging this pull request may close these issues.

3 participants