module GenesisClient::RemoteActions

Public Instance Methods

create_remote_action_log(id, message) click to toggle source

Create a new Log for a Remote Action.

@return [Hashie::Mash] Hash representing the log @param id [String, Integer] The id of the remote action @param message [String] Log message

# File lib/genesis_client/remote_actions.rb, line 43
def create_remote_action_log(id, message)
  data = { message: message }
  post("/remote_actions/#{id}/logs", data)['log']
end
list_remote_actions(zone, status = 'created')
Alias for: remote_actions
remote_action(id) click to toggle source

Receive a single Remote Action.

@return [Hashie::Mash] Hash representing the remote action. @param id [String, Integer] The id of the remote action @example

client = GenesisClient::Client.new
client.remote_action('234')
# File lib/genesis_client/remote_actions.rb, line 25
def remote_action(id)
  get("/remote_actions/#{id}")['remote_action']
end
remote_actions(zone, status = 'created') click to toggle source

Receive a list of all Devices.

@return [Array<Hashie::Mash>] Array of hashes representing remote actions. @example

client = GenesisClient::Client.new
client.remote_actions
# File lib/genesis_client/remote_actions.rb, line 9
def remote_actions(zone, status = 'created')
  filters = {
    zone: zone,
    status: status
  }
  get('/remote_actions', filters)['remote_actions']
end
Also aliased as: list_remote_actions
update_remote_action(id, data) click to toggle source

Modify an existing Remote Action.

@return [Hashie::Mash] Hash representing the remote action. @param id [String, Integer] The id of the remote action @param data [Hash] Remote Action attributes to update

# File lib/genesis_client/remote_actions.rb, line 34
def update_remote_action(id, data)
  put("/remote_actions/#{id}", data)['remote_action']
end