Skip to content

Commit

Permalink
Merge pull request #654 from DocNow/add_metadata_list_lookup
Browse files Browse the repository at this point in the history
Add __twarc metadata to list_lookup returned data
  • Loading branch information
edsu committed Sep 12, 2022
2 parents f4232b4 + f2bbc5a commit c65ef7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion twarc/client2.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,13 @@ def list_lookup(self, list_id, expansions=None, list_fields=None, user_fields=No
if expansions:
params["expansions"] = "owner_id"
url = f"https://api.twitter.com/2/lists/{list_id}"
return self.get(url, params=params).json()
resp = self.get(url, params=params)
data = resp.json()

if self.metadata:
data = _append_metadata(data, resp.url)

return data

def list_tweets(
self,
Expand Down
2 changes: 1 addition & 1 deletion twarc/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import platform

version = "2.11.2"
version = "2.11.3"

user_agent = f"twarc/{version} ({platform.system()} {platform.machine()}) {platform.python_implementation()}/{platform.python_version()}"

0 comments on commit c65ef7a

Please sign in to comment.