Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/apollo-roboto/twitterraffle

Command line utility to list or get a random user for twitter raffles
https://github.com/apollo-roboto/twitterraffle

cli python python3 raffle twitter

Last synced: about 1 month ago
JSON representation

Command line utility to list or get a random user for twitter raffles

Awesome Lists containing this project

README

        

# Twitter Raffle

This is a little command line utility to get a random user for twitter raffles.

## How to use

Create a `.env` file containing the twitter developer token and credentials. You can get those
credentials on the [Twitter Developer Portal](https://developer.twitter.com/).

```env
APP_ID=
API_KEY=
API_KEY_SECRET=
BEARER_TOKEN=
```

Examples:
```bash
python ./src/main.py --id="" --conditions="like" list
python ./src/main.py --id="" --conditions="like retweet" pick
python ./src/main.py --id="" --conditions="like retweet reply" list --out="csv"
```

### Modes

`list`: Lists all the user matching the conditions of the raffle.

`pick`: Pick one random user from the list of users matching the conditions of the raffle.

### Parameters

`id`: required, The tweet id, you can find it at the end of the tweet url.

`conditions`: required, Conditions of the raffle, current options are `like`, `retweet` and `reply`.
**WARNING**, `reply` is limited to user replies from the last 7 days.

`out`: Chosses the output format for the list , options: `json`, `csv`, `stdout`.

`file`: File path for the user list (when `out` is not `stdout`).