Skip to content

add a demo for one-legged OAuth1 using Noun Project API #548

Merged
hadley merged 8 commits intor-lib:masterfrom
cderv:fix-542-add-demo
Dec 4, 2018
Merged

add a demo for one-legged OAuth1 using Noun Project API #548
hadley merged 8 commits intor-lib:masterfrom
cderv:fix-542-add-demo

Conversation

@cderv
Copy link
Copy Markdown
Contributor

@cderv cderv commented Nov 24, 2018

This closes #542 by providing a demo on using oauth_signature to use an OAuth1.0a One legged API.

@cderv
Copy link
Copy Markdown
Contributor Author

cderv commented Nov 24, 2018

Unfortunately, I am not sure how to do for demo to provide Key and Secret. I think demo files are run at built time, or at least can be run using demo().

Currently I left the Sys.getenv but it won't work unless the user register himself and add the env to Renviron. It this ok ?

@hadley
Copy link
Copy Markdown
Member

hadley commented Dec 4, 2018

Maybe use rstudioapi::askForPassword() instead of Sys.getenv()? Then it's one it's a bit more direct for the user.

You don't need to worry about the demos being automatically rerun.

# https://thenounproject.com/accounts/login/?next=/developers/apps/
# Add the below environment variable to your session
# (helper function : usethis::edit_r_environ())
nouns_app <- oauth_app("noun_project",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind using the standard tidyverse style here?

@hadley
Copy link
Copy Markdown
Member

hadley commented Dec 4, 2018

Actually, let me just finish this off since the changes are small and I need to practice my contributing back to PR skills

@hadley hadley merged commit e21943e into r-lib:master Dec 4, 2018
@hadley
Copy link
Copy Markdown
Member

hadley commented Dec 4, 2018

Thanks @cderv!

@cderv
Copy link
Copy Markdown
Contributor Author

cderv commented Dec 4, 2018

Thanks!
I really need to study and take care of the tidyverse style to stop having reviews about it 😉

@cderv cderv deleted the fix-542-add-demo branch December 4, 2018 22:05
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.

One legged OAuth1

2 participants