Class: Hypem::Request
Direct Known Subclasses
Class Method Summary collapse
Class Method Details
.get_data(path, page = 1) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/hypem/request.rb', line 16 def self.get_data(path, page=1) url = [path, 'json', page].join('/') response = get(url) response.delete("version") values = response.values values.size == 1 ? values.first : values end |
.get_resource(path, query = nil) ⇒ Object
12 13 14 |
# File 'lib/hypem/request.rb', line 12 def self.get_resource(path, query=nil) get('/api' + path, query: query) end |