In this challenge, we are required to perform some data parsing using JSON methods. Since I am going to use Python, I will be importing some libraries into my file and then make some real API calls to Twitter instead of using the provided JSON data.
I am going to do several things and still make this post as short as possible!
#perform some data parsing using json.
#make api calls to twitter servers
#### mozilla challenge – programming with twitter api
import urllib2 #python module for handling urls
import json #json anyone??
url = ‘http://api.twitter.com/1/statuses/user_timeline/eenvincible.json’
#make a simple dictionary/hash, add some items to it
#experiment on retrieving them by key and by value
#dictionaries are mutable
Hi! I am starting to dive deeper into the current challenge – Programming Twitter API. Just a quick basic review of the API requirements before we make any calls! Oh wait, why not take a look at what an API call looks like?
If you type the URL shown in that snapshot into your browser of choice, you will see something like this displayed:
Ugh! How messy is that? I really hope you will be able to look through that mess and identify some information that could help you build something useful!