mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
19 lines
428 B
TypeScript
19 lines
428 B
TypeScript
import Twit = require('twit');
|
|
|
|
const t = new Twit( {
|
|
consumer_key: '',
|
|
consumer_secret: '',
|
|
app_only_auth: true,
|
|
} );
|
|
|
|
t.post('statuses/update', { status: 'hello!' }).then(res => {
|
|
const status = res.data as Twit.Twitter.Status
|
|
console.log(status.id_str)
|
|
console.log(res.resp.statusCode)
|
|
})
|
|
|
|
t.stream('statuses/filter', {
|
|
track: ['#love','#goscha'],
|
|
follow: ['40436619', '606663038', '14466815']
|
|
})
|