Uncategorized08 Feb 2010 12:20 pm

Notes to be filled out as we go — please post your answers to exercises #1 and #2 as responses to the Day 6 notes.

7 Responses to “Day 6 First look at programming APIs”

  1. on 08 Feb 2010 at 2:55 pm raymondyee

    An example answer to #1 — see example from Chapter 6

    a query for puppy yielded

    The context page is

    http://www.flickr.com/photos/7841384@N07/1153699093/

    The medium size photo is

    http://farm2.static.flickr.com/1023/1153699093_d1fba451c9.jpg

  2. on 08 Feb 2010 at 2:58 pm raymondyee

    An example answer to #2 for 94720 is

    Barbara Boxer: B000711
    Barbara Lee: L000551
    Diane Feinstein: F000062

  3. on 09 Feb 2010 at 3:13 pm emily

    My Flickr photo search was for “kittens,” using the API search request below:
    http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key={mysecretAPIkey!don’tlook!}&tags=kittens

    The first photo element that I got back from the Flickr Explorer was:

    The URL for the context page is:
    http://www.flickr.com/photos/22412994@N08/4342013580/

    The medium size photo page URL is:
    http://farm3.static.flickr.com/2742/4342013580_2b73f0382e.jpg

  4. on 09 Feb 2010 at 3:14 pm emily

    For the Sunlight Labs exercise, I searched for the legislators in my hometown:

    http://services.sunlightlabs.com/api/legislators.allForZip.xml?apikey={mysecretAPIkey!don’tlook!}&zip=46012

    They are:
    Richard Lugar, bioguide_id=L000504
    Mike Pence, bioguide_id=P000587
    Evan Bayh, bioguide_id=B001233

  5. on 10 Feb 2010 at 8:44 am ddt

    This is strange… I posted my answers yesterday afternoon but they seem to be “awaiting moderation”. Here they are again:

    1. Search term was “Specialized Shiv”

    First term in the XML response was:

    The URL for the context page is: http://www.flickr.com/photos/25843176@N02 /4059336620/

    The medium sized photo is: http://farm3.static.flickr.com/2743/4059336620_bd545ed4d3.jpg

    2. For the ZIP code 02139:
    http://services.sunlightlabs.com/api/legislators.allForZip.xml?apikey=e7be07492e7a47eab8e0987201cbdb61&zip=02139

    yielded:
    Michael E. Capuano: C001037
    Paul G. Kirk: K000374
    John Forbes Kerry: K000148

  6. on 10 Feb 2010 at 12:15 pm Julian

    1. Query = “Gundam”

    The context page is,
    http://www.flickr.com/photos/39270009@N02/4345706239/

    The medium size photo is
    http://farm5.static.flickr.com/4009/4345706239_d6c0713a8c.jpg

    2. Zip = “91745”

    Gary G. Miller: M001139
    Diane Feinstein: F000062
    Barbara Boxer: B000711
    Grace Flores Napolitano: N000179

  7. on 10 Feb 2010 at 2:44 pm ade_chen

    1. Search term “leatherback sea turtle”
    First term in the XML response was:

    The URL for context page is:
    http://www.flickr.com/photos/30954604@N05/4176548439

    The medium-sized photo is:

    farm3.static.flickr.com/2725/4176548439_5395ec0a99.jpg

    2. For the zip code 60009 (Chicago):
    http://services.sunlightlabs.com/api/legislators.allForZip.xml?apikey=c9586d50d7e2431dbcfcfd43c15a42c8&zip=60009

    Yielded:
    Rep. Peter Roskam: R000580
    Sen. Roland Burris: B001266
    Sen. Richard Durbin: D000563

Trackback this Post | Feed on comments to this Post

Leave a Reply

You must be logged in to post a comment.