Method: Strutta::APIObject#create

Defined in:
lib/strutta-api/api_object.rb

#create(params = {}) ⇒ Hash

POST request (Uses instance vars of child object to generate resource path)

Returns:

  • (Hash)

    Parsed body of the API response


21
22
23
24
# File 'lib/strutta-api/api_object.rb', line 21

def create(params = {})
  @game.verify_no_id(@id)
  @game.create(params, "#{@game.id}/#{@root_path}")
end