March 2019
Beginner
490 pages
12h 40m
English
The created object has access to the GET and POST resources of the Twitter API, which are listed in the reference index: https://developer.twitter.com/en/docs/api-reference-index.
The Twitter package transforms the responses of the Twitter API, of JSON format, to a Python object. The Twitter API uses the JSON format by default to transmit information, but the Twitter module transforms the information into a dictionary-type object. This query returns the last two tweets related to Python in the English language:
>>> search= twitter.search.tweets(q="python", lang="en", count="2")>>> for item in search.keys(): >>> print(item)
In this script, we can see an example of an application that consumes the Twitter API, ...
Read now
Unlock full access