Module: Ryext::Models::Service
- Included in:
- Scan
- Defined in:
- lib/ryext/models/service.rb
Instance Method Summary collapse
- #base_uri ⇒ Object
- #base_url(*args) ⇒ Object
- #get(account, params = {}) ⇒ Object
- #instance_klass ⇒ Object
Instance Method Details
#base_uri ⇒ Object
4 5 6 |
# File 'lib/ryext/models/service.rb', line 4 def base_uri 'https://api.yext.com/v1' end |
#base_url(*args) ⇒ Object
8 9 10 |
# File 'lib/ryext/models/service.rb', line 8 def base_url(*args) base_uri + default_path(*args) end |
#get(account, params = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/ryext/models/service.rb', line 16 def get(account, params = {}) query = Query.new(self, params) new(account.request(query).data, account) end |
#instance_klass ⇒ Object
12 13 14 |
# File 'lib/ryext/models/service.rb', line 12 def instance_klass OpenStruct end |