twii
1.0.0
Solicitação do SDK do Twitter com Got
$ npm install twii
const T = require ( 'Twii' ) ;
const t = new T ( {
consumerKey : '' ,
consumerSecret : '' ,
accessToken : '' ,
accessTokenSecret : ''
} ) ;
t . get ( uri , params ) ;
t . post ( uri , params ) ;
Exemplo
( async ( ) => {
// GET
const getResponse = await t . get ( 'statuses/home_timeine' , { count : 5 } ) ;
console . log ( getResponse . body ) ;
// POST
const postResponse = await t . post ( 'statuses/update' , { status : 'Hi LitoMore' } ) ;
console . log ( postReponse . body ) ;
} ) ( ) ;
MIT © LitoMais