def request(method, parameters = {}):
    if len(keys) == 0:
        raise RuntimeError("No Flickr API keys defined")
    apikey = random.choice(keys)
    parameters = urllib.urlencode(parameters)
    url = "/services/rest?method={0}&format=rest&api_key={1}&{2}"
    url = url.format(method, apikey, parameters)
    conn = httplib.HTTPConnection("api.flickr.com")
    conn.request("GET", url)
    response = conn.getresponse().read()
    response = ElementTree.fromstring(response)
    conn.close()
    return response
Generic request method to the Flickr API.
dataset/ETHPy150Open cvondrick/pyvision/vision/flickr.py/request