jpopesculian / twitter-v2-rs

Rust bindings for Twitter API v2
https://docs.rs/twitter-v2/latest
102 stars 28 forks source link

get_user_tweets api may return only result_count. newest_id and oldest_id may be None #9

Closed ozgurcemsen closed 2 years ago

ozgurcemsen commented 2 years ago

get_user_tweets api may return only result_count(result_count=0). In those cases newest_id and oldest_id are None. E.g. send a get_user_tweets request with until_id set to the user's first tweet.

In those cases decoding errors with the TweetsMeta happens.

error decoding response body: missing field newest_id at line 1 column 26"

Changing newest_id and oldest_id Option fixes the issue.

jpopesculian commented 2 years ago

Awesome! Thanks!