Method: StorageRoom::Accessors::ClassMethods#load
- Defined in:
- lib/storage_room/accessors.rb
#load(url, parameters = {}) ⇒ Object
Load an object with the specified URL from the API
19 20 21 22 23 24 25 26 27 |
# File 'lib/storage_room/accessors.rb', line 19 def load(url, parameters = {}) return nil if url.blank? StorageRoom.log("Loading #{url}") httparty = get(url, parameters) handle_critical_response_errors(httparty) new_from_response_data(httparty.parsed_response.first[1]) end |