Class: Nextstop
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Instance Method Summary collapse
- #guide(guide_id, options = {}) ⇒ Object
-
#initialize(api_key) ⇒ Nextstop
constructor
A new instance of Nextstop.
- #place(place_id, options = {}) ⇒ Object
- #search(options = {}) ⇒ Object
- #search_guides(options = {}) ⇒ Object
- #search_places(options = {}) ⇒ Object
Constructor Details
#initialize(api_key) ⇒ Nextstop
Returns a new instance of Nextstop.
20 21 22 |
# File 'lib/nextstop.rb', line 20 def initialize(api_key) self.api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
18 19 20 |
# File 'lib/nextstop.rb', line 18 def api_key @api_key end |
Instance Method Details
#guide(guide_id, options = {}) ⇒ Object
40 41 42 |
# File 'lib/nextstop.rb', line 40 def guide(guide_id, ={}) mashup(self.class.get("/guide/#{guide_id}/", :query => .merge())) end |
#place(place_id, options = {}) ⇒ Object
36 37 38 |
# File 'lib/nextstop.rb', line 36 def place(place_id, ={}) mashup(self.class.get("/p/#{place_id}/", :query => .merge())) end |
#search(options = {}) ⇒ Object
24 25 26 |
# File 'lib/nextstop.rb', line 24 def search(={}) mashup(self.class.get("/search/", :query => .merge())) end |
#search_guides(options = {}) ⇒ Object
28 29 30 |
# File 'lib/nextstop.rb', line 28 def search_guides(={}) search .merge({:result_type => 'guides'}) end |
#search_places(options = {}) ⇒ Object
32 33 34 |
# File 'lib/nextstop.rb', line 32 def search_places(={}) search .merge({:result_type => 'places'}) end |