Giter VIP home page Giter VIP logo

unlisted-friends's Introduction

Unlisted Friends

A library for verify which following friends on Twitter that are not in your lists.

Install and setup

npm install unlisted-friends

You need to provide your own application keys for use the Twitter API.

  1. Visit https://dev.twitter.com/apps and register a new application.
  2. Go to the application Keys and Access Tokens page.
  3. Click on Create my access token to generate your access tokens.
  4. Pass the consumer key and consumer secret as second and third arguments respectively when you use the library.

How to use

The method returns a Promise with the a list of the names of the unlisted friends.

const unlisted = require('unlisted-friends');
const friends = unlisted.get('Garethderioth', '<PUT YOUR KEY HERE>', '<PUT YOUR KEY HERE>');

friends.then(response => {
  console.log(response);
}, error => {
  console.log(error);
})

If you have all your friends in list you will get something like:

> [Error: @Garethderioth does not have unlisted friends.]

But if you have unlisted friends you will get something like:

> ['CodePen', 'Miss_Mandaline']

The Twitter API has some rate limits window divided into 15 minute intervals. Learn more about it here. The library will print a message with the related error:

> [Error: Rate limit exceeded From Twitter API threw in members module.]

Notes

In order to avoid the Twitter API rate limit, this library retrieves only 6000 friends, 15 public lists and 5000 members for each list.

Roadmap

  • Include ES2015 support
  • Change the tests to AVA
  • Include Istanbul coverage
  • Include semantic-release
  • Include test and coverage checking
  • Include badges

unlisted-friends's People

Watchers

David Gomez avatar

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.