=Almodovar Almodovar is a client for BeBanjo's Movida API written in Ruby ==Getting started Install the gem (make sure you have http://rubygems.org in your gem source list): $ [sudo] gem install almodovar Now, let's play with irb: >> require 'almodovar' => true First you need an authentication token: >> auth = Almodovar::DigestAuth.new("realm", "user", "password") => # Now you have to instantiate a resource given its URL. Let's try with the root of the api: >> movida = Almodovar::Resource("http://movida.example.com/api", auth) => Ok. Let's see what we have under _platforms_ >> movida.platforms => [ YouTube , Vimeo ] Now, show me the _schedule_ of a _title_ given its external id: >> movida.titles(:external_id => "C5134350003").first.schedule(:expand => :schedulings) => 1122 2010-04-17T00:00:00Z 2010-06-17T00:00:00Z archive Of course, once you've got the URL of a resource, the next time you don't need to navigate from the root of the API. You can (should!) start from the resource URL: >> schedulings = Almodovar::Resource("http://staging.schedule.bebanjo.net/api/titles/498/schedule/schedulings", auth) => [ 1122 2010-04-17T00:00:00Z 2010-06-17T00:00:00Z archive ] Next, explore the {API docs}[http://wiki.github.com/bebanjo/almodovar/] to learn about other resources. ==To-do * Memoize linked resource calls so that the same request isn't made several times * See what is preventing latest version of Resourceful from working and fix it (Now we're using a vendorized, patched version based on resourceful 0.5.3) Copyright (c) 2010 BeBanjo S.L., released under the MIT license