module Nibo::ApiResource::List

Public Class Methods

included(base) click to toggle source
# File lib/nibo/api_resource/list.rb, line 14
def self.included(base)
  base.extend(List)
end

Public Instance Methods

list(type=nil) click to toggle source
# File lib/nibo/api_resource/list.rb, line 4
def list(type=nil)
  method = :get
  url_with_method = "#{url}#{url_method(method)}s"
  params = object_param(type, method) if type

  response = api_request(url_with_method,method,params)

  response.map{ |object| create_from(object)}
end