Class: Waqi::Service::Base
- Inherits:
-
Object
- Object
- Waqi::Service::Base
- Defined in:
- lib/waqi/services/base.rb
Direct Known Subclasses
City, Geolocation, Map, Search
Constant Summary collapse
- BASE_URL =
'https://api.waqi.info'.freeze
Instance Method Summary collapse
- #get(options = {}) ⇒ Object
-
#initialize(params = {}) ⇒ Base
constructor
A new instance of Base.
- #path ⇒ Object
Constructor Details
Instance Method Details
#get(options = {}) ⇒ Object
13 14 15 |
# File 'lib/waqi/services/base.rb', line 13 def get( = {}) parse(@connection.get(self.path, @params.merge())) end |
#path ⇒ Object
17 18 19 |
# File 'lib/waqi/services/base.rb', line 17 def path raise "path has not beed defined" end |