in Bot1/instrumented_file/twitterRetweet.py [0:0]
def lambda_handler(event, context):
try:
patch_all()
apiuse = authenticate_twitter()
searchString = os.environ['TweetSearchString']
numberOfTweets = 5
print('String to look for: {0} and nb of tweets to retrieve: {1}'.format(searchString,numberOfTweets))
retweet(apiuse, searchString, numberOfTweets)
except Exception as e:
print(e)
return {
"statusCode": 200,
"body": json.dumps(
{"message": "TwitterPoller"}
),
}