Class: Yelp::ResponseFormat

Inherits:
Record
  • Object
show all
Defined in:
lib/yelped/response_format.rb

Overview

Describes the available response formats when querying the Yelp web service for results.

Constant Summary collapse

JSON =

the format specifier to retrieve results as straight JSON content

Yelp::ResponseFormat.new(:name => 'json')
JSON_TO_RUBY =

the format specifier to retrieve results as Ruby objects converted from the returned JSON content via the json rubygem.

Yelp::ResponseFormat.new(:name => 'json_to_ruby')
PICKLE =

the format specifier to retrieve results as a serialized Python response. We’re not quite sure why you’d want to use this if you’re calling it from Ruby code, but we like to see completeness in an API.

Yelp::ResponseFormat.new(:name => 'pickle', :serialized => true)
PHP =

the format specifier to retrieve results as a serialized PHP response. We’re not quite sure why you’d want to use this if you’re calling it from Ruby code, but we like to see completeness in an API.

Yelp::ResponseFormat.new(:name => 'php', :serialized => true)

Instance Attribute Summary collapse

Method Summary

Methods inherited from Record

#initialize

Constructor Details

This class inherits a constructor from Yelp::Record

Instance Attribute Details

#nameObject (readonly)

the name of the response format



9
10
11
# File 'lib/yelped/response_format.rb', line 9

def name
  @name
end

#serializedObject (readonly) Also known as: serialized?

whether this response format returns serialized data (and, so, data that we probably don’t want to print to a log file and suchlike)



13
14
15
# File 'lib/yelped/response_format.rb', line 13

def serialized
  @serialized
end