Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Currently reading on goodreads
require 'faraday_middleware'
conn = => '') do |builder|
builder.use Faraday::Response::Mashify
builder.use Faraday::Response::ParseXml
builder.adapter Faraday.default_adapter
good_reads_key = 'your_key'
resp = conn.get "user/show/4714701.xml?key=#{good_reads_key}"
u = resp.body
currently_reading = u['GoodreadsResponse']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment