Class: PlatformAPI::Space

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

A space is an isolated, highly available, secure app execution environment.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Space

Returns a new instance of Space.



3061
3062
3063
# File 'lib/platform-api/client.rb', line 3061

def initialize(client)
  @client = client
end

Instance Method Details

#create(body = {}) ⇒ Object

Create a new space.

Parameters:

  • body:

    the object to pass as the request payload



3095
3096
3097
# File 'lib/platform-api/client.rb', line 3095

def create(body = {})
  @client.space.create(body)
end

#delete(space_id_or_space_name) ⇒ Object

Delete an existing space.

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space



3088
3089
3090
# File 'lib/platform-api/client.rb', line 3088

def delete(space_id_or_space_name)
  @client.space.delete(space_id_or_space_name)
end

#info(space_id_or_space_name) ⇒ Object

Info for existing space.

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space



3073
3074
3075
# File 'lib/platform-api/client.rb', line 3073

def info(space_id_or_space_name)
  @client.space.info(space_id_or_space_name)
end

#listObject

List existing spaces.



3066
3067
3068
# File 'lib/platform-api/client.rb', line 3066

def list()
  @client.space.list()
end

#update(space_id_or_space_name, body = {}) ⇒ Object

Update an existing space.

Parameters:

  • space_id_or_space_name:

    unique identifier of space or unique name of space

  • body:

    the object to pass as the request payload



3081
3082
3083
# File 'lib/platform-api/client.rb', line 3081

def update(space_id_or_space_name, body = {})
  @client.space.update(space_id_or_space_name, body)
end