class Appilf::Listing

Constants

PATH

Public Class Methods

list(params = {}) click to toggle source
# File lib/appilf/listing.rb, line 13
def self.list(params = {})
  response = api_get(listings_path, params: Appilf::Util.parse_query_params(params))
  Appilf::Util.translate_from_response(response)
end
listings_path(listing_id = nil) click to toggle source
# File lib/appilf/listing.rb, line 23
def self.listings_path(listing_id = nil)
  "#{APIActions::BASE_API_URL}#{PATH}/#{listing_id}"
end
new(listing_hash) click to toggle source
Calls superclass method Appilf::AppilfObject::new
# File lib/appilf/listing.rb, line 8
def initialize(listing_hash)
  add_relationships(listing_hash['data'].delete('relationships'))
  super
end
retrieve(listing_id) click to toggle source
# File lib/appilf/listing.rb, line 18
def self.retrieve(listing_id)
  response = api_get(listings_path(listing_id))
  Appilf::Util.translate_from_response(response)
end