a11yisimportant
v1.0.0
Published
[![Travis CI](https://img.shields.io/travis/AnandChowdhary/a11yisimportant.svg)](https://travis-ci.org/AnandChowdhary/a11yisimportant) [![Coverage Status](https://coveralls.io/repos/github/AnandChowdhary/a11yisimportant/badge.svg?branch=master)](https://c
Downloads
4
Readme
🐦 @a11yisimportant
@a11yisimportant is a Twitter bot which follows smart people tweeting about #a11y and retweets mentions. Written in Typescript and hosted on Oswald Labs Platform.
⭐ How it works
/follow
The follow endpoint follows users tweeting with the hashtag #a11y. It runs every hour, powered by IFTTT and a webhook:
- Find (mixed) tweets with hashtag #a11y
- Like all those tweets
- Make a list of users (unique)
- Remove any users @a11yisimportant already follows
- Follow everyone from this list
/retweet
The retweet endpoint retweets tweets that @a11yisimportant is tagged in. It runs every hour, powered by IFTTT and a webhook:
- Find (recent) tweets with mention @a11yisimportant
- Remove any tweets written by self
- Remove any tweets which are already retweeted
- Like every tweet in this list
- If this tweet is a reply, get the original tweet instead
- Remove any duplicates (unique array)
- Remove any "Thanks for the follow!" tweets
- Retweet every tweet in this list
Interfaces
This package also exposes the following Typescript interfaces:
SearchResult
for the result from a standard search using the Twitter APISearchMeta
for the metadata in a search resultUser
for a user's profileTweet
for a tweet object
You can use them like this:
import { Tweet } from "a11yisimportant/interfaces"
const tweet: Tweet = {
id_str: "1106516296085188609",
text: "Accessibility is important",
user: {
id_str: "1106514269758214144",
screen_name: "a11yisimportant"
}
// . . .
};
In each interface, longint strings are preferred since JavaScript natively doesn't support such large integers (e.g., id_str
instead of id
).
🛠️ Development
Install dependencies:
yarn
Compile Typescript to CommonJS before running the server:
yarn build
Run local server:
yarn start
✅ Todo
- [x] Auto follow
- [x] Auto retweet
- [x] Retweet CC original tweets
- [x] Like all mentions
- [x] Like all #a11y tweets
📝 License
MIT