Title: | Access Pinterest API |
---|---|
Description: | Get information (boards, pins and users) from the Pinterest <http://www.pinterest.com> API. |
Authors: | Colin Fay [cre, aut] |
Maintainer: | Colin Fay <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.4.0 |
Built: | 2024-11-03 03:54:23 UTC |
Source: | https://github.com/colinfay/rpinterest |
Create, delete, or edit a Board
create_board(name, description, token) delete_board(board, token) edit_board(board, name = NULL, description = NULL, token)
create_board(name, description, token) delete_board(board, token) edit_board(board, name = NULL, description = NULL, token)
name |
name of the new board for creation, new name to give for edit. |
description |
description of the board? |
token |
a character string with an access token generated with 'pinterest_token()' |
board |
a board name. |
Either a data.frame, or an error.
## Not run: create_board("testboard", "from rpinterest", token) delete_board("colinfay/testboard", token) edit_board("colinfay/testboard",description = "A new desc", token = token) ## End(Not run)
## Not run: create_board("testboard", "from rpinterest", token) delete_board("colinfay/testboard", token) edit_board("colinfay/testboard",description = "A new desc", token = token) ## End(Not run)
Create, delete, or edit a Pin
create_pin(file, board, note, link = NULL, token) delete_pin(id, token) edit_pin(id, board = NULL, note = NULL, link = NULL, token)
create_pin(file, board, note, link = NULL, token) delete_pin(id, token) edit_pin(id, board = NULL, note = NULL, link = NULL, token)
file |
the path to the file |
board |
name of the board (required) |
note |
a description (required) |
link |
an url (optional) |
token |
a character string with an access token generated with 'pinterest_token()' |
id |
a character string with an ID. |
Either a data.frame, or an error.
## Not run: create_pin("~/Pictures/graph.png", "my_board", "a graph", token = token) delete_pin("42080577756375754", token) edit_pin("42080577744990466",note = "run run run", token = token) ## End(Not run)
## Not run: create_pin("~/Pictures/graph.png", "my_board", "a graph", token = token) delete_pin("42080577756375754", token) edit_pin("42080577744990466",note = "run run run", token = token) ## End(Not run)
Get information about all the pins on a pinterest board using the board ID or user/name.
get_board_pins_by_id(id, token) get_board_pins_by_name(user, board, token)
get_board_pins_by_id(id, token) get_board_pins_by_name(user, board, token)
id |
a character string with an ID. |
token |
a character string with an access token generated with 'pinterest_token()' |
user |
a character string with a user name. |
board |
a character string with a board name. |
Either a data.frame, or an error.
## Not run: get_board_pins_by_id(id = "42080646457333782", token = token) get_board_pins_by_name(user = "colinfay", board = "violet-mon-amour", token = token) ## End(Not run)
## Not run: get_board_pins_by_id(id = "42080646457333782", token = token) get_board_pins_by_name(user = "colinfay", board = "violet-mon-amour", token = token) ## End(Not run)
Get information about a pinterest board using the board ID or the name/user combination.
get_board_spec_by_id(id, token) get_board_spec_by_name(user, board, token)
get_board_spec_by_id(id, token) get_board_spec_by_name(user, board, token)
id |
a character string with a board ID. |
token |
a character string with an access token generated with 'pinterest_token()' |
user |
a character string with a user name. |
board |
a character string with a board name. |
Either a data.frame, or an error.
## Not run: get_board_spec_by_id(id = "42080646457333782", token = token) get_board_spec_by_name(user = "colinfay", board = "blanc-mon-amour", token = token) ## End(Not run)
## Not run: get_board_spec_by_id(id = "42080646457333782", token = token) get_board_spec_by_name(user = "colinfay", board = "blanc-mon-amour", token = token) ## End(Not run)
Get user information about their account or about their boards.
get_logged_user(token) get_logged_user_boards(token) get_logged_user_boards_suggestions(count = 25, token)
get_logged_user(token) get_logged_user_boards(token) get_logged_user_boards_suggestions(count = 25, token)
token |
a character string with an access token generated with 'pinterest_token()' |
count |
for suggestions, the max number of suggestion to retrieve. |
Either a data.frame, or an error.
## Not run: get_logged_user(token) get_logged_user_boards(token) get_logged_user_boards_suggestions(token = token) ## End(Not run)
## Not run: get_logged_user(token) get_logged_user_boards(token) get_logged_user_boards_suggestions(token = token) ## End(Not run)
Get information about a pinterest pin using the pin ID.
get_pin_spec_by_id(id, token)
get_pin_spec_by_id(id, token)
id |
a character string with a pin ID. |
token |
a character string with an access token generated with 'pinterest_token()' |
Either a data.frame, or an error.
## Not run: get_pin_spec_by_id(id = "42080577745042298", token = token) ## End(Not run)
## Not run: get_pin_spec_by_id(id = "42080577745042298", token = token) ## End(Not run)
Get information about a Pinterest user using the ID or name.
get_user_spec_by_id(id, token) get_user_spec_by_name(user, token)
get_user_spec_by_id(id, token) get_user_spec_by_name(user, token)
id |
a character string with a user ID. |
token |
a character string with an access token generated with 'pinterest_token()' |
user |
a character string with a user name. |
Either a data.frame, or an error.
## Not run: get_user_spec_by_id(id = "42080715176677612", token = token) get_user_spec_by_name(user = "colinfay", token = token) ## End(Not run)
## Not run: get_user_spec_by_id(id = "42080715176677612", token = token) get_user_spec_by_name(user = "colinfay", token = token) ## End(Not run)
Send a ggplot plot to a Pinterest board
ggplot_to_pinterest(plot, board, note, link = NULL, token, ...)
ggplot_to_pinterest(plot, board, note, link = NULL, token, ...)
plot |
a ggplot object |
board |
the name of the board |
note |
description of the image |
link |
a link to put under the image |
token |
a character string with an access token generated with 'pinterest_token()' |
... |
arguments to be passed to 'ggsave()' |
Either a data.frame, or an error.
## Not run: library(ggplot2) x <- ggplot(iris, aes(Sepal.Length, Sepal.Width)) + geom_point() ggplot_to_pinterest(x, "colinfay/gris-mon-amour", "test rpinterest", token = token) ## End(Not run)
## Not run: library(ggplot2) x <- ggplot(iris, aes(Sepal.Length, Sepal.Width)) + geom_point() ggplot_to_pinterest(x, "colinfay/gris-mon-amour", "test rpinterest", token = token) ## End(Not run)
Create a Pinterest API token
pinterest_token(app, app_id, app_secret, verbose = TRUE, callback = "https://colinfay.me/rpinterestcallback/")
pinterest_token(app, app_id, app_secret, verbose = TRUE, callback = "https://colinfay.me/rpinterestcallback/")
app |
the name of your app |
app_id |
the ID of your app |
app_secret |
the secret of the app |
verbose |
wether of not to print a message about the auth process |
callback |
the callback uri for your app |
an access token