Go to https://developers.pinterest.com/apps/
and
register a new app. In this new app, use
https://colinfay.me/rpinterestcallback/
as a callback URL.
You can also use a custom callback if you build your own. Read the
Vignette “rpinterest-oauth” for more info about the why and the how.
Once your app is set, use pinterest_token to create a token:
You’ll be taken to a Pinterest login page and R will be waiting for a
connection code. After login,
https://colinfay.me/rpinterestcallback/
will contain a code
that you’ll need to paste back to R.
If your pinterest app is unauthorised, you’ll be granted 10 requests per hour per token.
Get information about your account :
get_logged_user()
,
get_logged_user_boards()
, and
get_logged_user_boards_suggestions()
return informations
about yourself.create_board()
creates a board on your account, with a
name and a description.create_pin()
creates a pin on one of your board, with a
name and a description, from a local file.delete_board()
delete a board on your account.delete_pin()
delete on one of your pin.edit_board()
edit a board on your account, with a name
and a description.edit_pin()
creates a pin on one of your board, with a
name and a description, from a local file.ggplot_to_pinterest()
sends a ggplot2 object to a
Pinterest Board. Note that {ggplot2}
has to be installed to
run this command.
Get all the pins from a board: