Class: GoogleShortLinks::Parser

Inherits:
HTTParty::Parser
  • Object
show all
Defined in:
lib/google_short_links/parser.rb

Overview

Parses the JSON that Google Short Links returns.

Constant Summary collapse

SupportedFormats =

Google returns the JSON response as a text/html mime type. This class only supports JSON currently.

{ 'text/html' => :json }

Instance Method Summary collapse

Instance Method Details

#jsonObject

Decodes JSON into a hash.



11
12
13
# File 'lib/google_short_links/parser.rb', line 11

def json
  MultiJson.decode(body)
end