Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yarnaimo/twimo

🕊 Twitter library for TypeScript
https://github.com/yarnaimo/twimo

nodejs twitter twitter-library typescript

Last synced: about 1 month ago
JSON representation

🕊 Twitter library for TypeScript

Awesome Lists containing this project

README

        

# twimo

Twitter library for TypeScript

## Install

```sh
yarn add @yarnaimo/twimo
# or
npm i -S @yarnaimo/twimo
```

## Usage

```ts
import { Twimo, twget, twpost } from '@yarnaimo/twimo'
import { Status } from 'twitter-d'

const twimo = Twimo({
consumerKey: '***',
consumerSecret: '***',
})({
token: '***',
tokenSecret: '***',
})

const response = await twget(twimo, 'statuses/show', params)

const response = await twpost(twimo, path, params)
```

## Shorthands

- twget
- lookupTweets
- searchTweets
- getMutedIds
- twpost
- createTweet
- postThread
- retweet

**Example**

```ts
import { lookupTweets } from '@yarnaimo/twimo'

const response = await lookupTweets(twimo, ['123', '456'])
```

## Utils

- plusOne
- minusOne
- originalTweet
- getMediaList
- TweetURL
- parse
- fromTweet
- UserPageURL
- parse
- fromUser