Class: Yahoo::LocalSearch::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/yahoo/local_search.rb,
lib/yahoo/local_search.rb

Overview

A Result contains the following fields:

id

The id of this result.

title

The name of the result

address

Street address of the result

city

City in which the result is located

state

State in which the result is located

phone

Phone number, if known

latitude

Latitude of the location

longitude

Longitude of the location

average_rating

Average score of end-user ratings for the business or service

total_ratings

Total number of ratings submitted for the business or service

total_reviews

Total number of ratings submitted for the business or service

last_review_date

Time of the last review submitted for the business or service

last_review_intro

The first few words of the last review submitted for the business or service

distance

Distance from the search location to this business or service

url

URL to the detailed page for a business

click_url

URL for linking to the detailed page for a business

map_url

URL for a map of the address

business_url

URL of the businesses website, if known

business_click_url

URL for linking to the businesses website, if known

categories

Hash of category names and category ids for this result

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressObject

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def address
  @address
end

#average_ratingObject

Returns the value of attribute average_rating

Returns:

  • (Object)

    the current value of average_rating



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def average_rating
  @average_rating
end

#business_click_urlObject

Returns the value of attribute business_click_url

Returns:

  • (Object)

    the current value of business_click_url



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def business_click_url
  @business_click_url
end

#business_urlObject

Returns the value of attribute business_url

Returns:

  • (Object)

    the current value of business_url



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def business_url
  @business_url
end

#categoriesObject

Returns the value of attribute categories

Returns:

  • (Object)

    the current value of categories



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def categories
  @categories
end

#cityObject

Returns the value of attribute city

Returns:

  • (Object)

    the current value of city



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def city
  @city
end

#click_urlObject

Returns the value of attribute click_url

Returns:

  • (Object)

    the current value of click_url



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def click_url
  @click_url
end

#distanceObject

Returns the value of attribute distance

Returns:

  • (Object)

    the current value of distance



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def distance
  @distance
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def id
  @id
end

#last_review_dateObject

Returns the value of attribute last_review_date

Returns:

  • (Object)

    the current value of last_review_date



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def last_review_date
  @last_review_date
end

#last_review_introObject

Returns the value of attribute last_review_intro

Returns:

  • (Object)

    the current value of last_review_intro



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def last_review_intro
  @last_review_intro
end

#latitudeObject

Returns the value of attribute latitude

Returns:

  • (Object)

    the current value of latitude



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude

Returns:

  • (Object)

    the current value of longitude



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def longitude
  @longitude
end

#map_urlObject

Returns the value of attribute map_url

Returns:

  • (Object)

    the current value of map_url



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def map_url
  @map_url
end

#phoneObject

Returns the value of attribute phone

Returns:

  • (Object)

    the current value of phone



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def phone
  @phone
end

#stateObject

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def state
  @state
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def title
  @title
end

#total_ratingsObject

Returns the value of attribute total_ratings

Returns:

  • (Object)

    the current value of total_ratings



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def total_ratings
  @total_ratings
end

#total_reviewsObject

Returns the value of attribute total_reviews

Returns:

  • (Object)

    the current value of total_reviews



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def total_reviews
  @total_reviews
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



13
14
15
# File 'lib/yahoo/local_search.rb', line 13

def url
  @url
end

Instance Method Details

#coordinatesObject

Returns an Array with latitude and longitude.



140
141
142
# File 'lib/yahoo/local_search.rb', line 140

def coordinates
  return [latitude, longitude]
end