Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitlyapi

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitlyapi

Bitly api

  • 1.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
32
increased by52.38%
Maintainers
1
Weekly downloads
 
Created
Source

This is the API of bitly.com

Build Status npm version

Installation

Using NPM npm install bitlyapi

Using GIT git clone https://github.com/kishanmadhesiya/bitly.git

Usage

You need 'ACCESS TOKEN' from bitly.com. Visit: https://bitly.com/a/oauth_apps

Check http://dev.bitly.com/ for more info.

Code
// For ES2015/ES6

import Bitly from 'bitlyapi';

let bitly = new Bitly('<YOUR ACCESS TOKEN>');

bitly.shorten('http://nodejs.org', (response) => {
  console.log(response);
}, (error) => {
  console.log(error);
});


// For ES5

var Bitly = require('bitlyapi');
var bitly = new Bitly('<YOUR ACCESS TOKEN>');

bitly.shorten('https://github.com/kishanmadhesiya/bitly')
  .then(function(response) {
    var short_url = response.data.url
    // Do something with data
  }, function(error) {
    throw error;
  });

Tests

To run tests type npm test. For coverage type npm run coverage

Bit.ly Features

This module is limited to the following API methods:

  • shorten
  • expand
  • clicks
  • clicks_by_minute
  • clicks_by_day
  • referrers
  • countries
  • bitly_pro_domain
  • lookup
  • info
  • history
  • link_edit

Keywords

FAQs

Package last updated on 01 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc