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

Collect Reply Tweets #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

greenwoodma
Copy link

This PR relates to issue #10

Essentially with the current version of the plugin, if you view the page for a single tweet then nothing is collected (not the tweet being viewed or any of the replies). This PR fixes that by collecting data from the TweetDetail endpoint. The code for checking a normal tweet object has been pulled out into a function so we can use it under multiple conditions (relating to the different API endpoints and their structures) which avoids code duplication but does make more changes to the code than I originally intended.

@greenwoodma
Copy link
Author

I've now updated this branch to also add flags for both promoted and related tweets. This uses the same approach as #17 for the promoted tweets (i.e. if you merge this PR that one is probably redundant) but extends it also to the reply tweets. A similar flag is then also used for the related tweets (these are the ones usually under a "Discover More" heading when viewed on the twitter web site).

I know multiple items in a single PR isn't the best strategy, but given the refactoring in the original it made more sense to add these extra flags here than in another PR that would have required extensive re-working if they were merged separately.

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.

1 participant