Class: Request::Action

Inherits:
Base::Event show all
Defined in:
lib/violet/request.rb

Overview

actions are used to retrieve informations about the Nabaztag or the Nabaztag’s owners. see constants of Request module, all Action are Request constant that begin with GET or SET. Request::GET_EARS_POSITION is not an Action in the violet API, but we implement it as it was.

see api.nabaztag.com/docs/home.html#getinfo

Instance Method Summary collapse

Methods inherited from Base::Event

#+, #streamed?

Constructor Details

#initialize(id) ⇒ Action

create a new Action with id



635
636
637
# File 'lib/violet/request.rb', line 635

def initialize id
  @id = id
end

Instance Method Details

#to_urlObject



639
640
641
# File 'lib/violet/request.rb', line 639

def to_url
    "action=#{@id}"
end