Uses Vercel's serverless functions to query the Twitter API.
Uses twitter-api-v2 as a wrapper.
All endpoints are under /api/.
Gets a user by username.
Endpoint: api/userbyusername
Params:
username: string
Returns: JSON of response data
Gets tweets from a user's timeline by user ID.
Endpoint: api/usertimeline
Params:
id : string
exclude: enum(retweets, replies)
(Optional)
Returns: JSON of response data
Gets accounts that the user is following, by user ID.
Endpoint: api/following
Params:
id : string
token: string
(Optional) - Pagination token to get more than 100 results
Returns: UserFollowingV2Paginator
in JSON format. Next token under res["meta"]["next_token"]