Skip to content

ottlngr/tinycc

Repository files navigation

tinycc

Travis-CI Build Status AppVeyor Build Status Coverage status

Use the tiny.cc API to shorten URLs!

API Key

You will need to use an API Key in order to access the tiny.cc API. You will receive an API Key after signing up at tiny.cc.

Rate Limiting

Development requests are limited to 50 per day, and no more than 5 concurrent requests from a single IP address at a time.

API Methods

  • shorten
  • shorten with custum hash
  • expand
  • expand_batch
  • total_visits
  • total_visits_batch
  • edit (not implemented in tinycc, yet)
  • delete
  • get_requests_count

Examples

Sign up and store credentials

# After creating an account at https://tiny.cc/, you can store your credentials using auth()
library(tinycc)

auth("your_login", "your_api_key")

Use the API

library(tinycc)

hash <- paste0(sample(c(LETTERS, letters, 0:9), 6, TRUE), collapse = "")
hash
#> [1] "FB4tmS"

# shorten https://ropensci.org/

shorten(longURL = "https://ropensci.org/", shortURL = hash)
#> No encoding supplied: defaulting to UTF-8.
#> $errorCode
#> [1] "0"
#> 
#> $errorMessage
#> [1] ""
#> 
#> $results
#> $results$short_url
#> [1] "http://tiny.cc/FB4tmS"
#> 
#> $results$userHash
#> [1] "FB4tmS"
#> 
#> $results$hash
#> [1] "FB4tmS"
#> 
#> 
#> $statusCode
#> [1] "OK"

See also

https://tiny.cc/api-docs

About

Use the tiny.cc API to shorten URLs!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages