Class: AssayDepot::ListItem

Inherits:
Object
  • Object
show all
Includes:
SearchModel
Defined in:
lib/assaydepot/endpoints.rb

Class Method Summary collapse

Methods included from SearchModel

#facets, #find, included, #initialize, #internal_results, #where

Class Method Details

.endpoint(id, format = "json") ⇒ Object



223
224
225
226
227
228
229
230
# File 'lib/assaydepot/endpoints.rb', line 223

def self.endpoint(id, format="json")
  if (id.is_a?(Array) && id.length > 1)
    url = "/dynamic_lists/#{id[0]}/items/#{id[1]}.#{format}"
  else
    url = "/dynamic_lists/#{id.is_a?(Array) ? id[0] : id}/items.#{format}"
  end
  url
end

.ref_nameObject



232
233
234
# File 'lib/assaydepot/endpoints.rb', line 232

def self.ref_name
  "items"
end