0.5.0 • Published 3 years ago

twitter-app-api v0.5.0

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

Twitter Application Only API

Build Status

A subset of the Twitter API can be used without a Twitter account.
This is done by using a different authentication method over oAuth.
This module handles authentication and abstracts the API endpoints to Javascript methods.

API Version

This package is only written to work against the Twitter v1.1 API and doesn't currently support the new V2 API.

Example

import Twitter from 'twitter-app-api'.Twitter;

async function init() {
  console.log('Authenticating client against Twitter API v1.1');
  let twit;
  try {
    twit = await Twitter.authenticate(process.env.TWITTER_API_KEY, process.env.TWITTER_API_SECRET, { tweet_mode: 'extended' });
  } catch(err) {
    console.error(err.message);
    console.error(err.body);
    process.exit(2);
  }
  console.log('Authentication completed');

  const tweets = await twit.statuses.timeline({ screen_name:'twitterapi', count:2 });
  tweets.forEach(function(twit) {
    console.log(twit.text);
  });

  // Do other stuff with the client
}

API

API

0.5.0

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago