mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 16:27:06 +00:00
14 lines
309 B
TypeScript
14 lines
309 B
TypeScript
import * as Twit from '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)
|
|
})
|