Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 2 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 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-08T06:03:54.000Z (almost 2 years ago)
- Last Synced: 2024-10-06T08:37:27.364Z (3 months ago)
- Topics: deno, deno-module, denoland, twitter, twitter-api, twitter-bot, typescript
- Language: TypeScript
- Homepage:
- Size: 82 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twi [![Deno](https://shield.deno.dev/x/twi)](https://deno.land/x/twi) [![v2](https://img.shields.io/endpoint?url=https%3A%2F%2Ftwbadges.glitch.me%2Fbadges%2Fv2)](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).