class
PlaceOS::Client::APIWrapper::Systems
- PlaceOS::Client::APIWrapper::Systems
- PlaceOS::Client::APIWrapper::Endpoint
- Reference
- Object
Included Modules
- PlaceOS::Client::APIWrapper::Endpoint::Destroy
- PlaceOS::Client::APIWrapper::Endpoint::Fetch(PlaceOS::Client::API::Models::System)
Defined in:
placeos/api_wrapper/systems.crConstructors
Instance Method Summary
-
#base : String
The base route for the endpoint
-
#count(id : String, module_name : String) : Int32 | Nil
Gets the number of module_name instances available in system id.
-
#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.
-
#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.
-
#functions(id : String, module_name : String, index : Int = 1)
Queries the behaviour exposed by a module within system id.
-
#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.
- #settings(id : String)
-
#start(id : String)
Start all modules within a system.
-
#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.
-
#stop(id : String)
Stops all modules within a system.
-
#types(id : String)
Queries the types of modules available in system id.
-
#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.
-
#with_emails(list : Array(String) | String)
Returns systems with a specified email address(es)
Instance methods inherited from module PlaceOS::Client::APIWrapper::Endpoint::Destroy
destroy(id : String)
destroy
Instance methods inherited from module PlaceOS::Client::APIWrapper::Endpoint::Fetch(PlaceOS::Client::API::Models::System)
fetch(id : String)
fetch
Instance methods inherited from class PlaceOS::Client::APIWrapper::Endpoint
base : String
base
Constructor methods inherited from class PlaceOS::Client::APIWrapper::Endpoint
new(client : APIWrapper)
new
Macros inherited from class PlaceOS::Client::APIWrapper::Endpoint
delete(path, params = nil, headers = nil, body = nil, as model = nil)
delete,
get(path, params = nil, headers = nil, body = nil, as model = nil)
get,
head(path, params = nil, headers = nil, body = nil, as model = nil)
head,
options(path, params = nil, headers = nil, body = nil, as model = nil)
options,
patch(path, params = nil, headers = nil, body = nil, as model = nil)
patch,
post(path, params = nil, headers = nil, body = nil, as model = nil)
post,
put(path, params = nil, headers = nil, body = nil, as model = nil)
put
Constructor Detail
Instance Method Detail
The base route for the endpoint
Gets the number of module_name instances available in system id.
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.
Executes a behaviour exposed by a module within the passed system id.
Queries the behaviour exposed by a module within system id.
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:
Operator | Action
-------- | ------
+
| Matches both terms
|
| Matches either terms
-
| Negates a single token
"
| Wraps tokens to form a phrase
(
)
| Provides precedence
~N
| Specifies edit distance (fuzziness) after a word
~N
| Specifies slop amount (deviation) after a phrase
Up to limit systems will be returned, with a paging based on offset.
Queries the state exposed by a module within the passed system id.
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.