Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support likes and retweets endpoints. #588

Merged
merged 6 commits into from
Jan 27, 2022
Merged

Support likes and retweets endpoints. #588

merged 6 commits into from
Jan 27, 2022

Conversation

SamHames
Copy link
Contributor

@SamHames SamHames commented Jan 25, 2022

This will add support for the newly useful like and retweets endpoints, that now allow retrieving all of the likes and retweets of a specific tweet, or retrieve a specific users likes.

This implementation uses the Twitter API naming of these functions (ie what's in the URLs) for consistency.

  • Add client methods to support the new endpoints
  • Add basic CLI layer support
  • Do some targeted testing of the CLI layer/some investigation of the results.
  • Documentation - this will especially need to capture that the liking_users and retweeted_by return user profiles. In the latter case this is also a shame because it doesn't give the time information of the retweet.

closes #403 (kind of?)
closes #466

@SamHames SamHames requested a review from igorbrigadir January 25, 2022 01:58
For most cases it won't matter, but it might include details
about API errors that could be important?
@SamHames
Copy link
Contributor Author

Also, is it just me, or does nothing in the API show how many tweets a user has liked? It's visible in the web view of a profile, but apparently it's not the public_metrics field?

@SamHames SamHames marked this pull request as ready for review January 27, 2022 00:44
@SamHames SamHames requested a review from edsu January 27, 2022 00:44
@SamHames
Copy link
Contributor Author

Okay, I've done some more testing (and had someone else do some experimentation) and added some more explanatory docs, should be ready to merge if everyone else is happy?

@edsu
Copy link
Member

edsu commented Jan 27, 2022

This looks awesome @SamHames. One thing I've noticed is that we've started to have some inconsistency between snake_case and kebab-case in the cli. I would prefer if we use kebab -- any objections?

Copy link
Member

@edsu edsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! I just adjusted the cli and docs to use kebab-case.

twarc/command2.py Show resolved Hide resolved
@edsu edsu merged commit a0afccb into main Jan 27, 2022
@igorbrigadir igorbrigadir deleted the likes_retweets branch January 27, 2022 13:48
@igorbrigadir
Copy link
Contributor

This is great! Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Likes endpoint Retweets
3 participants