mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-01-30 13:37:35 +00:00
14 lines
310 B
TypeScript
14 lines
310 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)
|
|
})
|