From 5ed662b1b6efea95234e593b02eba4e9fff8f0e9 Mon Sep 17 00:00:00 2001 From: Suhem Parack Date: Tue, 1 Mar 2022 15:07:15 -0800 Subject: [PATCH] updates based on PR comments --- examples/API_v2/get_liked_tweets.py | 2 +- examples/API_v2/get_users_mentions.py | 2 +- examples/API_v2/get_users_timeline.py | 2 +- examples/API_v2/lookup_tweets_using_tweet_ids.py | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/API_v2/get_liked_tweets.py b/examples/API_v2/get_liked_tweets.py index c117868..3cdb201 100644 --- a/examples/API_v2/get_liked_tweets.py +++ b/examples/API_v2/get_liked_tweets.py @@ -16,6 +16,6 @@ tweets = client.get_liked_tweets(id, tweet_fields=["created_at"]) # Print the Tweet text and the time the Tweet was created for tweet in tweets.data: - print(tweet.text) + print(tweet.id) print(tweet.created_at) \ No newline at end of file diff --git a/examples/API_v2/get_users_mentions.py b/examples/API_v2/get_users_mentions.py index 916d1bd..c6673a4 100644 --- a/examples/API_v2/get_users_mentions.py +++ b/examples/API_v2/get_users_mentions.py @@ -15,5 +15,5 @@ tweets = client.get_users_mentions(id) # Print the Tweet text for tweet in tweets.data: - print(tweet.text) + print(tweet.id) \ No newline at end of file diff --git a/examples/API_v2/get_users_timeline.py b/examples/API_v2/get_users_timeline.py index c62ba33..cec5254 100644 --- a/examples/API_v2/get_users_timeline.py +++ b/examples/API_v2/get_users_timeline.py @@ -15,5 +15,5 @@ tweets = client.get_users_tweets(id) # Print the Tweet text for tweet in tweets.data: - print(tweet.text) + print(tweet.id) \ No newline at end of file diff --git a/examples/API_v2/lookup_tweets_using_tweet_ids.py b/examples/API_v2/lookup_tweets_using_tweet_ids.py index 5db1290..847b98c 100644 --- a/examples/API_v2/lookup_tweets_using_tweet_ids.py +++ b/examples/API_v2/lookup_tweets_using_tweet_ids.py @@ -8,14 +8,14 @@ bearer_token = "" client = tweepy.Client(bearer_token) # Replace Tweet IDs -ids = ["1409935014725177344", "1409931481552543749", "1441054496931541004"] +ids = [1409935014725177344, 1409931481552543749, 1441054496931541004] # By default the Tweet ID and Tweet text are returned. If you want additional # Tweet fields, specify those in tweet_fields -tweets = client.get_tweets(ids, tweet_fields=["created_at"]) +tweets = client.get_tweets(ids=ids, tweet_fields=["created_at"]) # Print the Tweet text and the time the Tweet was created for tweet in tweets.data: - print(tweet.text) + print(tweet.id) print(tweet.created_at) \ No newline at end of file -- 2.25.1