@feecting/twitter
v0.2.3
Published
Feecting twitter module
Downloads
5
Readme
@indra.ai/twitter
@indra.ai/twitter
is a Class utility for accessing the Twitter API.
installing
npm install @indra.ai/twitter --save
including in your code
const Twitter = require("@indra.ai/twitter")
Dependencies:
- request
Example:
Using
TwitterServer.js in some other file
// using TwitterServer
const TwitterServer = require("@indra.ai/twitter");
const tw = new TwitterServer({
consumer_key: "your_key",
consumer_secret: "your_secret",
token: "your_token",
token_secret: "your_secret"
});
// now let's get our timeline from the new twitter server
tw.timeline("screen_name")
.then(response => {
console.log("RESPONSE", response);
})
.catch(err => {
console.log("ERROR", err);
});