0.1.3 • Published 4 years ago
@amotarao/twitter v0.1.3
@amotarao/twitter
Twitter API Client on Node.js.
Supporting for Twitter API v1.1 and v2
import Twitter from '@amotarao/twitter';
const client = new Twitter({
api_version: '2',
consumer_key: '',
consumer_secret: '',
access_token_key: '',
access_token_secret: '',
});
const params = {
usernames: 'Twitter,TwitterJP',
'user.fields': 'profile_image_url',
};
client.get('/users/by', params)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Installation
npm install @amotarao/twitter