Skip to content

Commit f7582cf

Browse files
committed
fix some smaller things
1 parent 3e4aab1 commit f7582cf

5 files changed

Lines changed: 72 additions & 69 deletions

File tree

DESCRIPTION

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ Title: R Wrapper for the 'Bit.ly' and 'Is.gd'/'v.gd' URL Shortening
44
Services
55
Description: Allows using two URL shortening services, which also provide
66
expanding and analytic functions. Specifically developed for 'Bit.ly' (which requires OAuth 2.0) and 'is.gd' (no API key).
7-
Version: 2.0.0
8-
Date: 2025-04-13
7+
Version: 2.1.0
8+
Date: 2025-09-06
99
Authors@R:
1010
c(
1111
person("John", "Malc", email = "cincenko@outlook.com", role = c("aut", "cre"), comment = "@dmpe"),
1212
person("Andrea", "Dodet", role = c("ctb"), comment = "@andodet"),
1313
person("Stephen", "Synchronicity", role = c("ctb"), comment="@yogat3ch"))
1414
Maintainer: John Malc <cincenko@outlook.com>
1515
Encoding: UTF-8
16-
Depends: R (>= 4.2)
17-
Imports: httr2 (>= 1.1.2), jsonlite (>= 2.0.0), stringr (>= 1.5.1),
18-
lubridate (>= 1.9.4), assertthat (>= 0.2.1), shiny (>= 1.10.0),
19-
clipr (>= 0.8.0), miniUI (>= 0.1.1.1), cli (>= 3.6.4)
20-
Suggests: roxygen2 (>= 7.3.2), knitr (>= 1.50), testthat (>= 3.2.3),
21-
rmarkdown (>= 2.29), httpuv (>= 1.6.15), stringi (>= 1.8.7),
16+
Depends: R (>= 4.4)
17+
Imports: httr2 (>= 1.2.1), jsonlite (>= 2.0.0), stringr (>= 1.5.1),
18+
lubridate (>= 1.9.4), assertthat (>= 0.2.1), shiny (>= 1.11.1),
19+
clipr (>= 0.8.0), miniUI (>= 0.1.1.1), cli (>= 3.6.5)
20+
Suggests: roxygen2 (>= 7.3.3), knitr (>= 1.50), testthat (>= 3.2.3),
21+
rmarkdown (>= 2.29), httpuv (>= 1.6.16), stringi (>= 1.8.7),
2222
covr (>= 3.6.4), lintr (>= 3.2.0), dotenv (>= 1.0.3)
2323
VignetteBuilder: knitr
2424
License: Apache License 2.0
2525
URL: https://github.com/dmpe/urlshorteneR
2626
BugReports: https://github.com/dmpe/urlshorteneR/issues
27-
RoxygenNote: 7.3.2
27+
RoxygenNote: 7.3.3
2828
NeedsCompilation: no

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ For the current development, the user can
22
see: https://github.com/dmpe/urlshorteneR
33

44
###
5+
September 2025 - Fix bug reported by user regarding v.gd function
6+
57
April 2025 - Major rewrite of the package, using `httr2` as REST backend.
68
- Remove oAUTH2 authentication and replaced it with Bearer token authentication.
79
- Removed RStudio Addins functionality to shorten and expand bit.ly links via clipboard, without any AuthN.

urlshorteneR.Rproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ LineEndingConversion: Native
1717

1818
BuildType: Package
1919
PackageUseDevtools: Yes
20+
PackageCleanBeforeInstall: No
2021
PackageInstallArgs: --no-multiarch --with-keep.source
2122
PackageCheckArgs: --as-cran
22-
PackageRoxygenize: rd,collate,namespace,vignette
23+
PackageRoxygenize: rd,collate,namespace
2324

2425
QuitChildProcessesOnExit: Yes

vignettes/Tutorial.R

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
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+
## --------------------------------------------------------------------------------------------------------------------------------------
5353
isgd_LinksShorten(longUrl = "https://www.google.com", showRequestURL = TRUE)
5454

55-
## -----------------------------------------------------------------------------
55+
## --------------------------------------------------------------------------------------------------------------------------------------
5656
vgd_LinksShorten(longUrl = "https://www.apple.com", showRequestURL = TRUE)
5757

vignettes/Tutorial.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For 2 other services `is.gd` & `v.gd`, there is no authentication needed. Just c
2323

2424
Return some basic information about my user on Bit.ly. Additionally, is my account a "premium" one?
2525

26-
```{r}
26+
```{r, eval=FALSE}
2727
library("knitr")
2828
library(urlshorteneR)
2929
@@ -36,15 +36,15 @@ if (interactive()) {
3636

3737
We can also decide to update my username with a different one.
3838

39-
```{r}
39+
```{r, eval=FALSE}
4040
if (interactive()) {
4141
bitly_update_user(name = "John Malc", showRequestURL = TRUE)
4242
}
4343
```
4444

4545
And what about the metadata about our OAUTH application?
4646

47-
```{r}
47+
```{r, eval=FALSE}
4848
if (interactive()) {
4949
bitly_bearerToken("access token")
5050
bitly_app_details()
@@ -55,7 +55,7 @@ if (interactive()) {
5555

5656
This retrieves information about a single group that user belongs to and and then about all groups that user are associated with.
5757

58-
```{r}
58+
```{r, eval=FALSE}
5959
if (interactive()) {
6060
bitly_bearerToken("access token")
6161
bitly_retrieve_group(ui$default_group_guid)
@@ -69,7 +69,7 @@ Official API documentation <https://dev.bitly.com/api-reference>.
6969

7070
The first method returns an information about myself.
7171

72-
```{r}
72+
```{r, eval=FALSE}
7373
if (interactive()) {
7474
bitly_bearerToken("access token")
7575
bitly_user_info()
@@ -78,7 +78,7 @@ if (interactive()) {
7878

7979
### Custom Bitlinks
8080

81-
```{r}
81+
```{r, eval=FALSE}
8282
if (interactive()) {
8383
df <- data.frame(
8484
pubDate = rep("2016-02-10", 4),

0 commit comments

Comments
 (0)