https://github.com/rojvv/twi
Twitter API v2 Client for Deno
https://github.com/rojvv/twi
deno deno-module denoland twitter twitter-api twitter-bot typescript
Last synced: 6 months ago
JSON representation
Twitter API v2 Client for Deno
- Host: GitHub
- URL: https://github.com/rojvv/twi
- Owner: rojvv
- License: apache-2.0
- Created: 2022-07-18T16:11:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-08T06:03:54.000Z (over 2 years ago)
- Last Synced: 2025-02-23T18:11:46.665Z (8 months ago)
- Topics: deno, deno-module, denoland, twitter, twitter-api, twitter-bot, typescript
- Language: TypeScript
- Homepage:
- Size: 82 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twi [](https://deno.land/x/twi) [](https://developer.twitter.com/en/docs/twitter-api)
> Twitter API client for Deno ported from
> [twitter-api-typescript-sdk](https://github.com/twitterdev/twitter-api-typescript-sdk).## Example
```js
import { Client } from "https://deno.land/x/twi/mod.ts";const client = new Client("BEARER_TOKEN");
const stream = client.tweets.sampleStream({
"tweet.fields": ["author_id"],
});
for await (const tweet of stream) {
console.log(tweet.data?.author_id);
}
```Check out [examples/](./examples) for more examples or see
[this real-word bot](https://github.com/roj1512/rtwtrbt).