Packageorg.iotashan.nabaztagAPI
Classpublic class NabaztagAPIService
InheritanceNabaztagAPIService Inheritance flash.events.EventDispatcher

The NabaztagAPIService is the core of this API Library. This is where you gather all the data for your API call, and actually make the API call.

For more info on the Nabaztag API, go to: http://api.nabaztag.com/



Public Properties
 PropertyDefined by
  action : Number
The action you wish to use to get data about the API or your Rabbit.
NabaztagAPIService
  chor : NabaztagChoreography
Sending a choreography to your Nabaztag.
NabaztagAPIService
  chortitle : String
The name of the choreography.
NabaztagAPIService
  ears : Boolean
Boolean that decides to send the position of the ears to your Nabaztag.
NabaztagAPIService
  idapp : String
This is your application ID.
NabaztagAPIService
  idmessage : String
The number of the message to send.
NabaztagAPIService
  nabcast : String
Id of your nabcast.
NabaztagAPIService
  nabcasttitle : String
Title of the post in your nabcast.
NabaztagAPIService
  pitch : Number
Allows you to modulate the voice's frequency.
NabaztagAPIService
  posleft : Number
Position of the left ear between 0 and 16.
NabaztagAPIService
  posright : Number
Position of the right ear between 0 and 16.
NabaztagAPIService
  sn : String
The serial number of your rabbit.
NabaztagAPIService
  speed : Number
Allows you to choose the reading speed of the message.Values ranging from 1 to 32000.
NabaztagAPIService
  token : String
Your rabbit's token.
NabaztagAPIService
  ttlive : Number
Allows you to define the length of time you want a message to remain on the site (in seconds).
NabaztagAPIService
  tts : String
(Text To Speech) String that will be converted into speech and read by your rabbit.
NabaztagAPIService
  urlList : String
URL address of the MP3 file that you want your Nabaztag/tag to read.
NabaztagAPIService
  voice : NabaztagVoice
Allows you to choose the voice that will read the message.
NabaztagAPIService
Public Methods
 MethodDefined by
  
NabaztagAPIService(sn:String, token:String)
Constructor method.
NabaztagAPIService
  
getURL():String
Returns the Nabaztag API URL.
NabaztagAPIService
  
send():void
Sends the command(s) to the API.
NabaztagAPIService
Events
 EventSummaryDefined by
   Dispatched when the API comes back, regardless of what the XML result says.NabaztagAPIService
   Dispatched if the http result is a fault.NabaztagAPIService
Public Constants
 ConstantDefined by
  API_RESULT_EVENT : String = "apiResult"
String for the NabaztagAPIResultEvent type.
NabaztagAPIService
  API_URL : String = "http://api.nabaztag.com/vl/FR/api.jsp?"
The URL to the Nabaztag servers.
NabaztagAPIService
  NO_NUMERIC_VALUE : Number = -1
A numeric value to represent that a numeric value has not been selected
NabaztagAPIService
Property detail
actionproperty
action:Number  [read-write]

The action you wish to use to get data about the API or your Rabbit. Currently accepts numeric values from 1 to 14. For more information, see the Nabaztag API Docs.

Implementation
    public function get action():Number
    public function set action(value:Number):void
chorproperty 
chor:NabaztagChoreography  [read-write]

Sending a choreography to your Nabaztag.

Implementation
    public function get chor():NabaztagChoreography
    public function set chor(value:NabaztagChoreography):void
chortitleproperty 
chortitle:String  [read-write]

The name of the choreography.

Implementation
    public function get chortitle():String
    public function set chortitle(value:String):void
earsproperty 
ears:Boolean  [read-write]

Boolean that decides to send the position of the ears to your Nabaztag.

Implementation
    public function get ears():Boolean
    public function set ears(value:Boolean):void
idappproperty 
idapp:String  [read-write]

This is your application ID. It will allow you to authenticate the event's transmitter. This parameter is not yet in service.

Implementation
    public function get idapp():String
    public function set idapp(value:String):void
idmessageproperty 
idmessage:String  [read-write]

The number of the message to send. This number can refer to a message in the Library or a personal MP3 file that you have downloaded. You find this identification number under the title of the track you are listening to.

Implementation
    public function get idmessage():String
    public function set idmessage(value:String):void
nabcastproperty 
nabcast:String  [read-write]

Id of your nabcast. (if you want to publish a content in your nabcast)

Implementation
    public function get nabcast():String
    public function set nabcast(value:String):void
nabcasttitleproperty 
nabcasttitle:String  [read-write]

Title of the post in your nabcast.

Implementation
    public function get nabcasttitle():String
    public function set nabcasttitle(value:String):void
pitchproperty 
pitch:Number  [read-write]

Allows you to modulate the voice's frequency. Values ranging from 1 to 32000. Default is 100.

Implementation
    public function get pitch():Number
    public function set pitch(value:Number):void
posleftproperty 
posleft:Number  [read-write]

Position of the left ear between 0 and 16. (0 = ear vertical)

Implementation
    public function get posleft():Number
    public function set posleft(value:Number):void
posrightproperty 
posright:Number  [read-write]

Position of the right ear between 0 and 16. (0 = ear vertical)

Implementation
    public function get posright():Number
    public function set posright(value:Number):void
snproperty 
sn:String  [read-write]

The serial number of your rabbit. If you're reading this, you'll probably notice that it's actually the MAC address. It's on the bottom of your rabbit.

Implementation
    public function get sn():String
    public function set sn(value:String):void
speedproperty 
speed:Number  [read-write]

Allows you to choose the reading speed of the message.Values ranging from 1 to 32000. Default is 100.

Implementation
    public function get speed():Number
    public function set speed(value:Number):void
tokenproperty 
token:String  [read-write]

Your rabbit's token. If you don't know it, you can find it at http://my.nabaztag.com on your preferences page. It's in the Nabazphere pod. You will also need to check the checkbox that says "I want to receive the services and applications of the Nabazphere on my Nabaztag."

Implementation
    public function get token():String
    public function set token(value:String):void
ttliveproperty 
ttlive:Number  [read-write]

Allows you to define the length of time you want a message to remain on the site (in seconds). By default, the message will be stored for a period of two months.

Implementation
    public function get ttlive():Number
    public function set ttlive(value:Number):void
ttsproperty 
tts:String  [read-write]

(Text To Speech) String that will be converted into speech and read by your rabbit.

Implementation
    public function get tts():String
    public function set tts(value:String):void
urlListproperty 
urlList:String  [read-write]

URL address of the MP3 file that you want your Nabaztag/tag to read. If you wish to play several MP3 files in a row, you can can seperate them with the pipe character « | ».

Implementation
    public function get urlList():String
    public function set urlList(value:String):void
voiceproperty 
voice:NabaztagVoice  [read-write]

Allows you to choose the voice that will read the message.

Implementation
    public function get voice():NabaztagVoice
    public function set voice(value:NabaztagVoice):void
Constructor detail
NabaztagAPIService()constructor
public function NabaztagAPIService(sn:String, token:String)

Constructor method.

Parameters
sn:String
 
token:String
Method detail
getURL()method
public function getURL():String

Returns the Nabaztag API URL. We don't include any properties with null values.

Returns
String
send()method 
public function send():void

Sends the command(s) to the API. We don't send any properties with null values.

Event detail
apiResultevent 
Event object type: APIResultEvent

Dispatched when the API comes back, regardless of what the XML result says.

FAULTevent  
Event object type: FaultEvent

Dispatched if the http result is a fault. Usually means that the Nabaztag servers are down

Constant detail
API_RESULT_EVENTconstant
public const API_RESULT_EVENT:String = "apiResult"

String for the NabaztagAPIResultEvent type.

API_URLconstant 
public const API_URL:String = "http://api.nabaztag.com/vl/FR/api.jsp?"

The URL to the Nabaztag servers. Currently it's only used for display purposes, because the crossdomain.xml file is not open

NO_NUMERIC_VALUEconstant 
public const NO_NUMERIC_VALUE:Number = -1

A numeric value to represent that a numeric value has not been selected