README.md in goodreads-0.4.3 vs README.md in goodreads-0.5.0

- old
+ new

@@ -25,30 +25,30 @@ Before using Goodreads API you must create a new application. Visit [signup form](http://www.goodreads.com/api/keys) for details. Setup client: ``` ruby -client = Goodreads::Client.new(:api_key => 'KEY', :api_secret => 'SECRET') -client = Goodreads.new(:api_key => 'KEY') # short version +client = Goodreads::Client.new(api_key: "KEY", api_secret: "SECRET") +client = Goodreads.new(api_key: "KEY") # short version ``` ### Global configuration You can define client credentials on global level. Just create an initializer file (if using rails) under `config/initializers`: ``` ruby Goodreads.configure( - :api_key => 'KEY', - :api_secret => 'SECRET' + api_key: "KEY", + api_secret: "SECRET" ) ``` Get global configuration: ``` ruby -Goodreads.configuration # => {:api_key => 'YOUR_KEY'} +Goodreads.configuration # => { api_key: "YOUR_KEY" } ``` In case you need to reset options: ```ruby @@ -60,32 +60,32 @@ ### Lookup books You can lookup a book by ISBN, ID or Title: ```ruby -client.book('id') -client.book_by_isbn('ISBN') -client.book_by_title('Book title') +client.book("id") +client.book_by_isbn("ISBN") +client.book_by_title("Book title") ``` Search for books (by title, isbn, genre): ```ruby -search = client.search_books('The Lord Of The Rings') +search = client.search_books("The Lord Of The Rings") search.results.work.each do |book| book.id # => book id book.title # => book title end ``` ### Authors - + Look up an author by their Goodreads Author ID: ```ruby -author = client.author('id') +author = client.author("id") author.id # => author id author.name # => author's name author.link # => link to author's Goodreads page author.fans_count # => number of fans author has on Goodreads @@ -101,11 +101,11 @@ ``` Look up an author by name: ```ruby -author = client.author_by_name('Author Name') +author = client.author_by_name("Author Name") author.id # => author id author.name # => author name author.link # => link to author's Goodreads page ``` @@ -124,11 +124,11 @@ ``` Get review details: ```ruby -review = client.review('id') +review = client.review("id") review.id # => review id review.user # => user information review.book # => uook information review.rating # => user rating @@ -150,11 +150,11 @@ ### Groups Get group details: ```ruby -group = client.group('id') +group = client.group("id") group.id # => group id group.title # => group title group.access # => group's access settings # => (e.g., public or private) @@ -162,11 +162,11 @@ ``` List the groups a given user is a member of: ```ruby -group_list = client.group_list('user_id', 'sort') +group_list = client.group_list("user_id", "sort") group_list.total # => total number of groups group_list.group.count # => number of groups returned in the request # Loop through the list to get details for each of the groups. @@ -179,16 +179,16 @@ g.image_url # => url of the group's image g.last_activity_at # => date and time of the group's last activity end ``` -The `sort` parameter is optional, and defaults to `my_activity`. +The `sort` parameter is optional, and defaults to `my_activity`. For other sorting options, [see here](http://www.goodreads.com/api#group.list). ### OAuth -For API calls requiring permission, such as write operations or browsing friends, +For API calls requiring permission, such as write operations or browsing friends, see our [OAuth tutorial](examples/oauth.md). ## Testing To run the test suite: @@ -208,6 +208,6 @@ ## License The MIT License (MIT) -Copyright (c) 2011-2015 Dan Sosedoff, <dan.sosedoff@gmail.com> \ No newline at end of file +Copyright (c) 2011-2015 Dan Sosedoff, <dan.sosedoff@gmail.com>