|
1 | | -## ----------------------------------------------------------------------------- |
2 | | -library("knitr") |
3 | | -library(urlshorteneR) |
4 | | - |
5 | | -if (interactive()) { |
6 | | - bitly_bearerToken("access token") |
7 | | - ui <- bitly_user_info(showRequestURL = TRUE) |
8 | | - is_bitly_user_premium_holder() |
9 | | -} |
10 | | - |
11 | | -## ----------------------------------------------------------------------------- |
12 | | -if (interactive()) { |
13 | | - bitly_update_user(name = "John Malc", showRequestURL = TRUE) |
14 | | -} |
15 | | - |
16 | | -## ----------------------------------------------------------------------------- |
17 | | -if (interactive()) { |
18 | | - bitly_bearerToken("access token") |
19 | | - bitly_app_details() |
20 | | -} |
21 | | - |
22 | | -## ----------------------------------------------------------------------------- |
23 | | -if (interactive()) { |
24 | | - bitly_bearerToken("access token") |
25 | | - bitly_retrieve_group(ui$default_group_guid) |
26 | | - bitly_retrieve_groups() |
27 | | -} |
28 | | - |
29 | | -## ----------------------------------------------------------------------------- |
30 | | -if (interactive()) { |
31 | | - bitly_bearerToken("access token") |
32 | | - bitly_user_info() |
33 | | -} |
34 | | - |
35 | | -## ----------------------------------------------------------------------------- |
36 | | -if (interactive()) { |
37 | | - df <- data.frame( |
38 | | - pubDate = rep("2016-02-10", 4), |
39 | | - link = c( |
40 | | - "https://www.google.com", |
41 | | - "https://www.apple.com" |
42 | | - ) |
43 | | - ) |
44 | | - df |
45 | | - |
46 | | - fin <- NULL |
47 | | - for (p in 1:length(df$link)) { |
48 | | - fin[[p]] <- bitly_create_bitlink(long_url = df$link[p]) |
49 | | - } |
50 | | -} |
51 | | - |
52 | | -## ----------------------------------------------------------------------------- |
| 1 | +## ----eval=FALSE------------------------------------------------------------------------------------------------------------------------ |
| 2 | +# library("knitr") |
| 3 | +# library(urlshorteneR) |
| 4 | +# |
| 5 | +# if (interactive()) { |
| 6 | +# bitly_bearerToken("access token") |
| 7 | +# ui <- bitly_user_info(showRequestURL = TRUE) |
| 8 | +# is_bitly_user_premium_holder() |
| 9 | +# } |
| 10 | + |
| 11 | +## ----eval=FALSE------------------------------------------------------------------------------------------------------------------------ |
| 12 | +# if (interactive()) { |
| 13 | +# bitly_update_user(name = "John Malc", showRequestURL = TRUE) |
| 14 | +# } |
| 15 | + |
| 16 | +## ----eval=FALSE------------------------------------------------------------------------------------------------------------------------ |
| 17 | +# if (interactive()) { |
| 18 | +# bitly_bearerToken("access token") |
| 19 | +# bitly_app_details() |
| 20 | +# } |
| 21 | + |
| 22 | +## ----eval=FALSE------------------------------------------------------------------------------------------------------------------------ |
| 23 | +# if (interactive()) { |
| 24 | +# bitly_bearerToken("access token") |
| 25 | +# bitly_retrieve_group(ui$default_group_guid) |
| 26 | +# bitly_retrieve_groups() |
| 27 | +# } |
| 28 | + |
| 29 | +## ----eval=FALSE------------------------------------------------------------------------------------------------------------------------ |
| 30 | +# if (interactive()) { |
| 31 | +# bitly_bearerToken("access token") |
| 32 | +# bitly_user_info() |
| 33 | +# } |
| 34 | + |
| 35 | +## ----eval=FALSE------------------------------------------------------------------------------------------------------------------------ |
| 36 | +# if (interactive()) { |
| 37 | +# df <- data.frame( |
| 38 | +# pubDate = rep("2016-02-10", 4), |
| 39 | +# link = c( |
| 40 | +# "https://www.google.com", |
| 41 | +# "https://www.apple.com" |
| 42 | +# ) |
| 43 | +# ) |
| 44 | +# df |
| 45 | +# |
| 46 | +# fin <- NULL |
| 47 | +# for (p in 1:length(df$link)) { |
| 48 | +# fin[[p]] <- bitly_create_bitlink(long_url = df$link[p]) |
| 49 | +# } |
| 50 | +# } |
| 51 | + |
| 52 | +## -------------------------------------------------------------------------------------------------------------------------------------- |
53 | 53 | isgd_LinksShorten(longUrl = "https://www.google.com", showRequestURL = TRUE) |
54 | 54 |
|
55 | | -## ----------------------------------------------------------------------------- |
| 55 | +## -------------------------------------------------------------------------------------------------------------------------------------- |
56 | 56 | vgd_LinksShorten(longUrl = "https://www.apple.com", showRequestURL = TRUE) |
57 | 57 |
|
0 commit comments