FeedHive / twitter-api-client

A user-friendly Node.js / JavaScript client library for interacting with the Twitter API.
MIT License
948 stars 84 forks source link

Add two v2 endpoints: one to retrieve user's information and one to retrieve user's timeline tweets #92

Closed An-dy1 closed 2 years ago

An-dy1 commented 2 years ago

What does this pull request introduce? Please describe
This pull request introduces two additional v2 endpoints:

  1. User Tweet timeline endpoint which returns the most recent Tweets composed by a specified user ID.
  2. A user lookup that returns information about an authorized user.

It also includes a few small tweaks to the contrib guide to make the instructions more accurate.

How did you verify that your changes work as expected? Please describe
I followed the instructions for manual testing in the contrib guide. Namely, I created a new node project locally, installed my version of the client, and then consumed it.

Example
Please describe how we can try out your changes

  1. Create a new node project
  2. Install this version of the client
  3. Supply the client your Twitter developer credentials
  4. Use the users.usersMe endpoint to retrieve your authenticated user's id string.
  5. Pass that id string to the timelines.usersIdTweets endpoint.
  6. Log the results to the console.

Screenshots
In this screenshot, you can see the two new endpoints as well as the data they returned printed in the console:

Screen Shot 2022-01-15 at 4 16 06 PM

Screenshot of existing unit tests passing:

Screen Shot 2022-01-15 at 4 14 31 PM

Version
1.5.2

PR Checklist Please verify that you:

An-dy1 commented 2 years ago

Found fixes I need to make.