module Mambu::Finders
Public Instance Methods
find(id, connection)
click to toggle source
# File lib/mambu/finders.rb, line 3 def find(id, connection) response = connection.get("#{endpoint(connection)}/#{id}") fail response.error unless response.success? new(response.body) end
find_all(connection)
click to toggle source
# File lib/mambu/finders.rb, line 9 def find_all(connection) response = connection.get(endpoint(connection)) fail response.error unless response.success? response.body.map { |data| new(data) } end