redouane59 / twittered

Twitter API client for Java developers
Apache License 2.0
235 stars 64 forks source link

No non_public_metrics etc in Tweets #363

Open xberger opened 2 years ago

xberger commented 2 years ago

Hi,

I was surprised to find non of the non_public_metrics, organic_metrics,promoted_metrics objects in this library. Is there some reason for this?

If one would - hypothetically speaking - add that objects to twittered, is there anything special to consider? Are those objects manually created or did you use some kind of framework to automatically generate java data classes from the API responses?

Best, xberger

redouane59 commented 2 years ago

Hello,

It is possible that these fields are missing because nobody asked it before and were not implemented initially. It is managed manually so maybe a quick update of the object class needs to be done. If you have some time feel free to submit a pull request (I'm currently in holiday without access to any laptop but I could check it from mobile)

xberger commented 2 years ago

Hi,

thanks for the quick reply. Happy holidays!

I'm on it. Just out of interest: what purpose serves having most of the data in a class called TweetData in TweetV2, instead directly in TweetV2? Had some trouble with the non-standard LOGGER var, since I tried using classes in a different context, but resolved that. Well, I guess my setup is not optimal, but thats a different topic. :)

redouane59 commented 2 years ago

If I remember correctly, we had to split it because depending on the endpoint, the returned object is different (if it returns only one tweet or a list of tweets). But feel free to submit any improvement if you think that it worth it! :)

redouane59 commented 2 years ago

Hey,

I'm back from holiday :) Any new ? Did you start working on a pull request or did you want me to check it ?

xberger commented 2 years ago

Hi,

I have finished and created a pull-request: https://github.com/redouane59/twittered/pull/366

Still, there are a lot of questions arising, I noted them in the pull-request.