From f0f1730fc37853c30ccd354978de848a436d44ac Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Sun, 26 Aug 2012 08:21:02 +0400 Subject: [PATCH] Readme fixes --- README.md | 34 ++++++++++++++++++++++++++-------- lib/robbie.rb | 2 +- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f0a8c0e..153f9e6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Robbie -Rovi API wrapper +[Rovi](http://developer.rovicorp.com/Get_Started) API wrapper ## Installation @@ -21,16 +21,21 @@ $ gem install robbie ## Usage -*Working with models* +Working with models ```ruby require "robbie" Robbie.setup(api_key: "your api key", api_secret: "your api secret") foo = Robbie::Artist.find_by_name("foo fighters") -# ]> +# ] +# > # ...or directly by id -foo = Robbie::Artist.find_by_name("MA0000002613") +foo = Robbie::Artist.find("MA0000002613") foo.albums.last # @@ -39,7 +44,14 @@ foo.albums.last Robbie::Album.find("MW0002115022") foo.albums.last.tracks.first -# ], @title="Bridge Burning", @duration=286> +# ], +# @title="Bridge Burning", +# @duration=286 +# > # ...or directly by id Robbie::Track.find("MT0041016087") @@ -48,13 +60,19 @@ Robbie::Track.find("MT0041016087") Autocomplete and extended autocomplete ```ruby Robbie::Autocomplete.complete("b") -# ["Beyoncé", "Bruno Mars", "Bad Meets Evil", "Bon Iver", "Bob Marley", "Big Sean", "The Band Perry", "Blake Shelton", "B.O.B", "The Black Eyed Peas"] +# ["Beyoncé", "Bruno Mars", "Bad Meets Evil", "Bon Iver", "Bob Marley", +# "Big Sean", "The Band Perry", "Blake Shelton", "B.O.B", "The Black Eyed Peas"] Robbie::Autocomplete.predict("b").first -# ]> +# ] +# > ``` -*You can turn response caching* +You can turn response caching ```ruby # on Robbie.enable_cache diff --git a/lib/robbie.rb b/lib/robbie.rb index 849e621..8919f25 100644 --- a/lib/robbie.rb +++ b/lib/robbie.rb @@ -17,7 +17,7 @@ require "robbie/models/genre" require "robbie/autocomplete" module Robbie - @@cache_enabled = true + @@cache_enabled = false class << self def setup(params) const_set(:API_KEY, params[:api_key])