Coder Social home page Coder Social logo

tinycc's Introduction

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

tinycc's People

Contributors

ottlngr avatar

Stargazers

Damien Croteau-Chonka avatar Christophe Dervieux avatar  avatar Nicholas Tierney avatar Maëlle Salmon avatar boB Rudis avatar

Watchers

James Cloos avatar  avatar

tinycc's Issues

tinycc + Twitter issues

Just a heads up - tiny.cc links appear to make Twitter angry.

Not an issue with your package (it works great!) but wanted you to be aware in case anyone opens up another issue later on.

If tweeting from within R via rtweet you get a This request looks like it might be automated. To protect our users from spam and other malicious activity, we can't complete this action right now. Please try again later. Error message.

If tweeting from Twitter app or web-app - you just get a generic failure message.

More information on the Twitter Dev Forums.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.