class PlaceOS::Client::APIWrapper::Zones

Included Modules

Defined in:

placeos/api_wrapper/zones.cr

Constructors

Instance Method Summary

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::Zone)

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

def self.new(client : APIWrapper) #

[View source]

Instance Method Detail

def base : String #
Description copied from class PlaceOS::Client::APIWrapper::Endpoint

The base route for the endpoint


[View source]
def create(name : String, description : String | Nil = nil, tags : Array(String) | Nil = nil, settings : Settings | Nil = nil, triggers : Array(String) | Nil = nil, display_name : String | Nil = nil, location : String | Nil = nil, code : String | Nil = nil, type : String | Nil = nil, count : Int32 | Nil = nil, capacity : Int32 | Nil = nil, map_id : String | Nil = nil, parent_id : String | Nil = nil) #

Creates a new zone.


[View source]
def execute(id : String, method : String, module_name : String, index : Int32 = 1, args = nil) #

[View source]
def search(q : String | Nil = nil, limit : Int = 20, offset : Int = 0, parent_id : String | Nil = nil, tags : Array(String) | String | Nil = nil) #

List or search for zones.

Results maybe filtered by specifying a query - q - to search across zone 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 zones will be returned, with a paging based on offset.

Results my also also be limited to those associated with specific tags.


[View source]
def update(id : String, name : String | Nil = nil, description : String | Nil = nil, tags : Array(String) | Nil = nil, settings : Settings | Nil = nil, triggers : Array(String) | Nil = nil, display_name : String | Nil = nil, location : String | Nil = nil, code : String | Nil = nil, type : String | Nil = nil, count : Int32 | Nil = nil, capacity : Int32 | Nil = nil, map_id : String | Nil = nil, parent_id : String | Nil = nil) #

Updates zone attributes or configuration.


[View source]