class Assembly::ApiModel
Public Class Methods
path()
click to toggle source
# File lib/assembly/api_model.rb, line 7 def self.path "/#{Util.underscore(self.class_name)}s" end
Public Instance Methods
path()
click to toggle source
# File lib/assembly/api_model.rb, line 3 def path "#{self.class.path}/#{id}" end
Protected Instance Methods
pages(path, params)
click to toggle source
# File lib/assembly/api_model.rb, line 13 def pages(path, params) results = [] page = 1 while page response = client.get(path, {page: page, per_page: 100}.merge(params)) ret = Util.build(response, client) results += ret.data page = ret.next_page end results end