Class RestApi
In: tests/lib/rest_api.rb
Parent: Object

Methods

create   current   current_site_api   delete   fields   list   new   read   update  

Attributes

continue_on_bad_code  [RW] 
last_id  [RW] 
last_response  [RW] 
rest_obj  [RW] 

Public Class methods

Returns the last used REST API object or creates a new one with the indicated rest_obj rest_obj: String, name of the REST resource, e.g. ‘site‘

           defaults via Oats.data 'RestApi.object'.
           Calling RestApi.new directly does not change current.

Verifies obj/XXXFields output

Creates a new REST API object rest_obj: String, name of the REST resource, e.g. ‘site‘

Public Instance methods

Returns id of created object, or nil if errors Prints returned Message Raises OatsTestError if code does not match expected

input:HASH or JSON string of input resources

Deletes the object for the requested ID Returns HTTP response object Prints returned message

Returns Array of existing object ids Prints the Array

Returns Hash for requested object Prints returned JSON

Returns response code Prints returned Message Raises OatsTestError if code does not match expected

input:HASH or JSON string of input resources

[Validate]