Hone Your Powers – Part 2 (JSON)

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!

[python]
#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’

Hone Your Powers – Programming 101

In this challenge, we are required to learn some basic python or ruby constructs that could be useful while converting data returned by Twitter API calls into useful information that we can use in applications. Of course we don’t have to use either of those languages. There are other great languages like Javascript and PHP that you could give a shot! Either way, let us start this ball rolling: I am going with Python!

[python]

#make a simple dictionary/hash, add some items to it
#experiment on retrieving them by key and by value
#dictionaries are mutable

Channel Your Vision – Call Me Maybe API

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?

twitterapicall

If you type the URL shown in that snapshot into your browser of choice, you will see something like this displayed:

returnedjsonfromtwitter

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!