module Assembly::Actions::List::ClassMethods

Public Instance Methods

all(params, client=Assembly.client) click to toggle source
# File lib/assembly/actions/list.rb, line 10
def all(params, client=Assembly.client)
  params.delete(:page)
  params.delete(:per_page)
  results = []
  page = 1
  while page
    ret = list({page: page, per_page: 100}.merge(params), client)
    results += ret.data
    page = ret.next_page
  end
  results
end
list(params, client=Assembly.client) click to toggle source
# File lib/assembly/actions/list.rb, line 5
def list(params, client=Assembly.client)
  response = client.get(path, params)
  Util.build(response, client)
end
total_count(params={}, client=Assembly.client) click to toggle source
# File lib/assembly/actions/list.rb, line 23
def total_count(params={}, client=Assembly.client)
  list({per_page: 1}.merge(params), client).total_count
end