This repository has been archived by the owner on Jun 30, 2023. It is now read-only.
Tags: cjbarrie/academictwitteR
Tags
add `hydrate_tweets` (#260) * Update utils.R Added an option to retrieve erroneous tweets with their error title. Changes are made in get_tweets() and df_to_json() in order to bind the erroneous tweets to the bound dataframe and make error_-json files in the data_path * Create tweets_lookup Function to access the API v2 Tweets Lookup (https://developer.twitter.com/en/docs/twitter-api/tweets/lookup/introduction) function. This is useful when looking to rehydrate tweets via their tweet IDs. An option to catch errors in the lookup process is added (see changes to utils for implementation) * Update tweets_lookup added total success overview at the end of the loop * Make runnable; pass all old unit tests * Add Tim König a contributor * Exclude the `errors` part for now (It will be for another PR) * Add documentation and rename `tweets_lookup` to `hydrate_tweets` * Add tests for corner cases * Add basic test cases * Clear check messages / errors * Correct documentation of `hydrate_tweets` on `context_annotations` * Update hydrate_tweets.R minor adjustment to make sure the reporting doesn't break the function when bind_tweets == F ("Retrieved" and "Total Tweets" verbose messages rely on the new_rows object which is only made if tweets are bound) * Reduce some verbosity Co-authored-by: chainsawriot <[email protected]>