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

tweets.statusesHomeTimeline uses wrong StatusesHomeTimeline return type #71

Closed repraze closed 3 years ago

repraze commented 3 years ago

Describe the bug
client.tweets.statusesHomeTimeline({...}) returns a list of statuses from the current user timeline. The type should be a list of tweets like Promise<StatusesHomeTimeline[]> and not Promise<StatusesHomeTimeline>. The type given currently is a single tweet even if we get an array of statuses.

To reproduce
Steps to reproduce the behavior:

  1. In a typescript project install the package
  2. call client.tweets.statusesHomeTimeline({...})
  3. the output is a list, the time is a single tweet

Expected behavior
The type should be a list if the method always returns a list of status. Promise<StatusesHomeTimeline[]>, Promise<Array <StatusesHomeTimeline>> or similar.

Package Manager:
npm

Additional context
N.A.

SimonHoiberg commented 3 years ago

Thanks a lot for the PR. v. 1.3.8 is released 🚀