January 2009

try out the zooomr api?

Because the ZooomrAPI was designed to emulate the Flickr API, it shouldn't be that hard to learn once you know the Flickr API.

APIs

Comments (0)

Permalink

Getting started with flickrapi

Based on reading theĀ  Python FlickrAPI, I wrote a simple example using the flickrapi library:

import flickrapi
API_KEY = '[API_KEY]'
API_SECRET = '[API_SECRET]'

if __name__ == '__main__':
    # instantiate the flickr object with the API_KEY, SECRET to return ElementTree entities
    flickr = flickrapi.FlickrAPI(api_key=API_KEY,secret=API_SECRET,format='etree')
    photos = flickr.photos_search(user_id='73509078@N00', per_page='10')

    if photos.attrib['stat']:
        for photo in photos.find('photos').getiterator('photo'):
            id = photo.attrib['id']
            secret = photo.attrib['secret']
            server_id = photo.attrib['server']
            farm_id = photo.attrib['farm']
            user_id = photo.attrib['owner']
            # calculate the thumbnail URL and photo URL
            # http://www.flickr.com/services/api/misc.urls.html
            thumbnail_url = "http://farm%s.static.flickr.com/%s/%s_%s_t.jpg" \
                            % (farm_id, server_id, id, secret)
            photo_url = "http://www.flickr.com/photos/%s/%s"  % (user_id, id)
            print thumbnail_url, photo_url

Flickr
Python

Comments (0)

Permalink

WordPress wish: converting a post to a page

I wish there were a simple way to convert a WordPress post to page — that is without copying and pasting the content — but there doesn't seem to be a way in WP right now (at least according to the convert post to page? thread).

Uncategorized

Comments (0)

Permalink

Getting started with Jython

Time to install The Jython Project. I installed both the current version (2.2.1) and the beta version (2.50b). Time to run through the Jython book and the Jython User Guide.

Uncategorized

Comments (0)

Permalink