Module: Request
- Defined in:
- lib/violet/request.rb
Defined Under Namespace
Modules: Base Classes: Action, AudioStream, Choregraphy, IdMessage, Query, SetEarsPosition, TtsMessage
Constant Summary collapse
- API_URL =
the VioletAPI url where we send request.
'http://api.nabaztag.com/vl/FR/api.jsp'- APISTREAM_URL =
the VioletAPI url for stream request.
'http://api.nabaztag.com/vl/FR/api_stream.jsp'- GET_LINKPREVIEW =
Preview the TTS or music (with music id) without sending it Examples Query.new(:event => GET_LINKPREVIEW, :serial => my_serial, :token => my_token).send! # => #<Response::LinkPreview:0x2aaaab100f88 @xml=
... </>> see Response::LinkPreview Action.new 1
- GET_FRIENDS_LIST =
Get a list of your friends Examples Query.new(:event => GET_FRIENDS_LIST, :serial => my_serial, :token => my_token).send! # => #<Response::ListFriend:0x2af08fd53568 @xml=
... </>> see Response::ListFriend Action.new 2
- GET_INBOX_LIST =
Get a count and the list of the messages in your inbox Examples Query.new(:event => GET_INBOX_LIST, :serial => my_serial, :token => my_token).send! # => #<Response::ListReceivedMsg:0x2aaaab0e0be8 @xml=
... </>> see Response::ListReceivedMsg Action.new 3
- GET_TIMEZONE =
Get the timezone in which your Nabaztag is set Examples Query.new(:event => GET_TIMEZONE, :serial => my_serial, :token => my_token).send! # => #<Response::Timezone:0x2af091e58f60 @xml=
... </>> see Response::Timezone Action.new 4
- GET_SIGNATURE =
Get the signature defined for the Nabaztag Examples Query.new(:event => GET_SIGNATURE, :serial => my_serial, :token => my_token).send! # => #<Response::Signature:0x2aaaab0c8c28 @xml=
... </>> see Response::Signature Action.new 5
- GET_BLACKLISTED =
Get a count and the list of people in your blacklist Examples Query.new(:event => GET_BLACKLISTED, :serial => my_serial, :token => my_token).send! # => #<Response::Blacklist:0x2aaaab0b0ad8 @xml=
... </>> see Response::Blacklist Action.new 6
- GET_RABBIT_STATUS =
Get to know if the Nabaztag is sleeping (YES) or not (NO) Examples Query.new(:event => GET_RABBIT_STATUS, :serial => my_serial, :token => my_token).send! # => #<Response::RabbitSleep:0x2aaaab092a88 @xml=
... </>> see Response::RabbitSleep Action.new 7
- GET_RABBIT_VERSION =
Get to know if the Nabaztag is a Nabaztag (V1) or a Nabaztag/tag (V2) Examples Query.new(:event => GET_RABBIT_VERSION, :serial => my_serial, :token => my_token).send! # => #<Response::RabbitVersion:0x2aaaab07c418 @xml=
... </>> see Response::RabbitVersion Action.new 8
- GET_LANG_VOICE =
Get a list of all supported languages/voices for TTS (text to speach) engine Examples Query.new(:event => GET_LANG_VOICE, :serial => my_serial, :token => my_token).send! # => #<Response::VoiceListTts:0x2aaaab064368 @xml=
... </>> see Response::VoiceListTts Action.new 9
- GET_RABBIT_NAME =
Get the name of the Nabaztag Examples Query.new(:event => GET_RABBIT_NAME, :serial => my_serial, :token => my_token).send! # => #<Response::RabbitName:0x2aaaab0459b8 @xml=
... </>> see Response::RabbitName Action.new 10
- GET_SELECTED_LANG =
Get the languages selected for the Nabaztag Examples Query.new(:event => GET_SELECTED_LANG, :serial => my_serial, :token => my_token).send! # => #<Response::LangListUser:0x2aaaab02bfb8 @xml=
... </>> see Response::LangListUser Action.new 11
- GET_MESSAGE_PREVIEW =
Get a preview of a message. This works only with the urlPlay parameter and URLs like broad/001/076/801/262.mp3 Examples Query.new(:event => GET_MESSAGE_PREVIEW, :serial => my_serial, :token => my_token).send! # => #<Response::LinkPreview:0x2aaaab011258 @xml=
... </>> see Response::LinkPreview Action.new 12
- GET_EARS_POSITION =
Get the position of the ears to your Nabaztag. this request is not an action in the Violet API but we do as if it was because it's make more sens (to me). Examples Query.new(:event => GET_EARS_POSITION, :serial => my_serial, :token => my_token).send! # => #<Response::PositionEar:0x2aaaaaff6908 @xml=
... </>> see Response::PositionEar Action.new nil
- SET_RABBIT_ASLEEP =
Send your Rabbit to sleep Examples Query.new(:event => SET_RABBIT_ASLEEP, :serial => my_serial, :token => my_token).send! # => #<Response::CommandSend:0x2aaaaafbf980 @xml=
... </>> see Response::CommandSend Action.new 13
- SET_RABBIT_AWAKE =
Wake up your Rabbit Examples Query.new(:event => SET_RABBIT_AWAKE, :serial => my_serial, :token => my_token).send! # => #<Response::CommandSend:0x2aaaaafa60c0 @xml=
... </>> see Response::CommandSend Action.new 14