ObjectiveFlickr 0.9.0 in Objective-C

December 11th, 2006

I’ve finally made the long overdue packaging of the latest version of ObjectiveFlickr (ObjC version). Some highlights:

  • A new app that demos how to make use of Flickr search API and WebKit to display cool search results, in the tradition of this Ruby on Rails demo.
  • Complete documentation generated by header2doc
  • A pre-built, ready-to-use ObjectiveFlickr.framework in the distributed package.

There are still lots of things to be done. As this is an on-going project and as I’ve learned a lot from developing it, I’ll continue improving this framework. Plans include unit testing, synchronous calls (now that I’ve understood how Cocoa’s performSelectorOnMainThread: works–a trick that involves threading, run loop, and a conditional lock), more documentation work, and better demo apps.

Meanwhile, do let me know if there’s anything ObjectiveFlickr can help you better. Thanks for the support!

ObjectiveFlickr in Ruby

December 11th, 2006

I have created another Flickr API library under the same name, this time in Ruby.

The Ruby version of ObjectiveFlickr is an ultra lightweight Flickr API libray that currently does only one thing: making Flickr API calls. It leverages the fact that Flickr now provides JSON as one of the repsonse data formats. JSON makes it easy to manage Flickr return data, since we don’t need to create different Ruby classes now–we simply convert back the returned JSON string into Ruby hash/array objects, which are already well structured.

To install ObjectiveFlickr as a Ruby gem, use the following command:

gem install objectiveflickr --include-dependencies

The document will be automatically prepared by gem’s installer. Currently there are only two classes: FlickrInvocation and FlickrResponse. Simply create a FlickrInvocation instance with your API key and shared secret, and start making Flickr API calls, and extract the returned data from the FlickrResponse instance. For example, this code snippets returns 10 square photos (75×75) with the tag “flower”:

require 'rubygems'
require 'objectiveflickr'

f = FlickrInvocation.new('bf67a649fffb210651334a09b92df02e')
r = f.call("flickr.photos.search", :tags => "flowers", :per_page => 10)

if r.ok?
  for p in r["photos"]["photo"]
    p[:size] = "s"
    puts f.photo_url(p)
  end
end

I’ll continue working on both libraries (ObjC and Ruby) so that they can be helpful in making Flickr apps. Meanwhile, feel free to comment or let me know how ObjectiveFlickr can help you better. Thanks!

Blog Created

October 22nd, 2006

It turned out that a dedicated blog is really better for a software. This is how I decided to create a new blog for ObjectiveFlickr.

We have made some progress recently. The documentation work is finally finished. We have new commiters (I’ll introduce them in another post!), and some more demo apps are on the way.

It’s really an exciting time doing web API-related works. We’ll see how ObjectiveFlickr involves along the way.