1.0.5 • Published 8 years ago

twitter-bot-environment v1.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

twitter-bot-environment

This library is meant to be a simple means of setting up a bot-by-bot authorization environment for Twitter.

The library looks for a auth.js file in the root of your project (or can be changed by passing auth_file as a prop to the constructor). It then reads it into memory and provides an environment that can be passed to modules such as twode.

Sample auth.js

It's best to add auth.js to your .gitignore file.

module.exports = {
	consumer_key: 'sample consumer key',
	consumer_secret: 'sample consumer secret',
	access_token_key: 'sample access token key',
	access_token_secret: 'sample access token secret'
};

Usage

var BotEnvironment = require('twitter-bot-environment');
var twitter = require('twode');

var be = new BotEnvironment({
	auth_file: 'auth.js' // This is the default value and doesn't need to be passed
});

var twitter_client = new twitter(be.getEnvironment());
1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago