How do you work with the output from this search client? #116
jimmoffitt
started this conversation in
Ideas
Replies: 1 comment
-
Here's how it's done in twarc: https://github.com/DocNow/twarc/blob/v2/twarc/expansions.py (it's almost identical to #112 because i added it there too) From another commit message that explains the reasoning:
So in #112 After the tweets are retrieved, they usually get stored as is in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are discussing how to handle client output... With v2 JSON, the search payloads are resigned with a core "data" array containing the Tweets that matched the query, along with an independent "includes" array that contains User objects, referenced Tweets (e.g. original Tweets for Quote Tweets and Retweets), along with other supporting Twitter objects (e.g. media, polls, places).
Before v2, the search payloads provided "atomic" Tweets, with all supporting object attributes inside the Tweet object.
We are working on a new "atomic" option to have the v2 client output atomic Tweet objects and doing the work of referencing associated "includes" objects and injecting them into the "data" Tweets... I think that would be cool. Two of us (thanks Igor!) are experimenting with this and should have an update here soon (?).
It would also be good to have the client just output the response as received from the search endpoint. Seems simple enough.
So, how do you work with the client output, and what new tricks would make your integrations easier?
I hope to plug this thing in as a "database loader", so maybe that will result in more built-in output options.
Beta Was this translation helpful? Give feedback.
All reactions