class

PlaceOS::Client::APIWrapper::Systems

Inherits PlaceOS::Client::APIWrapper::Endpoint::Destroy < PlaceOS::Client::APIWrapper::Endpoint::Fetch < PlaceOS::Client::APIWrapper::Endpoint < Reference < Object

Constructors

new(client : APIWrapper)
Source

Instance methods

base

The base route for the endpoint

Source
count(id : String, module_name : String) : Int32 | Nil

Gets the number of module_name instances available in system id.

Source
create(name : String, zones : Array(String), description : String | Nil = nil, email : String | Nil = nil, capacity : Int | Nil = nil, bookable : Bool | Nil = nil, installed_ui_devices : Int | Nil = nil, modules : Array(String) | Nil = nil, support_url : String | Nil = nil, display_name : String | Nil = nil, timezone : String | Nil = nil, code : String | Nil = nil, type : String | Nil = nil, map_id : String | Nil = nil, images : Array(String) | Nil = nil, features : Array(String) | Nil = nil, public : Bool | Nil = nil)

Creates a new system.

Systems must be given a unique name within the PlaceOS instance they are running from. Additionally, a system must be a member of at least one zone. All other attributes are optional at the time of creation.

Source
execute(id : String, module_name : String, method : String, index : Int32 = 1, *args : Array(JSON::Any::Type))

Executes a behaviour exposed by a module within the passed system id.

Source
functions(id : String, module_name : String, index : Int = 1)

Queries the behaviour exposed by a module within system id.

Source
search(q : String | Nil = nil, limit : Int = 1000, offset : Int = 0, zone_id : String | Nil = nil, module_id : String | Nil = nil, features : String | Nil = nil, capacity : Int32 | Nil = nil, bookable : Bool | Nil = nil)

List or search for systems.

Results maybe filtered by specifying a query - q - to search across system attributes. A small query language is supported within this:

OperatorAction
+Matches both terms
``
-Negates a single token
"Wraps tokens to form a phrase
( )Provides precedence
~NSpecifies edit distance (fuzziness) after a word
~NSpecifies slop amount (deviation) after a phrase

Up to limit systems will be returned, with a paging based on offset.

Source
settings(id : String)
Source
start(id : String)

Start all modules within a system.

Source
state(id : String, module_name : String, index : Int = 1, lookup : String | Nil = nil)

Queries the state exposed by a module within the passed system id.

Source
stop(id : String)

Stops all modules within a system.

Source
types(id : String)

Queries the types of modules available in system id.

Source
update(id : String, version : Int, name : String | Nil = nil, zones : Array(String) | Nil = nil, description : String | Nil = nil, email : String | Nil = nil, capacity : Int | Nil = nil, bookable : Bool | Nil = nil, installed_ui_devices : Int | Nil = nil, modules : Array(String) | Nil = nil, support_url : String | Nil = nil, display_name : String | Nil = nil, timezone : String | Nil = nil, code : String | Nil = nil, type : String | Nil = nil, map_id : String | Nil = nil, images : Array(String) | Nil = nil, features : Array(String) | Nil = nil, public : Bool | Nil = nil)

Requests a change to an existing system.

In addition to specifying the ID of the system to update, you must reference the the current system metadata version for the update to be allowed. This must match the current version attribute of the system and will be incrememented following a successful update.

Source
with_emails(list : Array(String) | String)

Returns systems with a specified email address(es)

Source