api - jcheype/NabAlive GitHub Wiki

API

Old way

The violet standard API is still accurate: http://nabaztag.forumactif.fr/t4152-violet-api-sending-a-url-to-a-nabaztag-tag

french : http://www.harfangdesneiges.free.fr/?article23/api-fr-nabz

Refer to the code available in ApiController.java

New way

There is a new way to make API calls as well!

All documentation refer to the code available in NabaztagController.java

In this section when you see an url like that:

/nabaztags/:apikey/tts/:voice?text=Bonjour

this means that ":apikey" and ":voice" should be set in the URL:

/nabaztags/469aaccd-52b6-4d2a-b2fb-xxxxxxxxxx/tts/fr?text=Bonjour

If your Nabaztag is connected to www.nabaztag.com all url should be prefixed by http://www.nabaztag.com

TTS

tts sample: (tts is currently only available in french)

/nabaztags/:apikey/tts/fr?text=Bonjour

PLAY

play mp3:

/nabaztags/:apikey/play?url=http%3A%2F%2Ftest.com%2Ftest.mp3

EXEC

Send a suite of command to the nabaztag separated with a carriage return

  • CH url : Launch a choreography see CHOR page for more info
  • CL 0xAARRVVBB : Set the LED color AA (form 00 to 04) with the RVB color (don't seems to work)
  • PL 0x : Choose the color palet, where X is 0 to 7
  • MC url or MU url : Read the mp3 pointed by url
  • MW : Wait previous actions to finish
  • ST url or SP url : Stream the content pointed by url
/nabaztags/:apikey/exec?command=CH+http%3A%2F%2Fwww.nabalive.com%2Fapi%2Fchor%2Frand%2F5%0AMW

SLEEP

put your nabaztag asleep:

/nabaztags/:apikey/sleep

WAKEUP

wakup your nabaztag:

/nabaztags/:apikey/wakeup

NAB2NABS

send text to subscribers: (tts is currently only available in french)

/nab2nabs/:apikey/tts?text=Bonjour%20le%20Monde

send Internet sound to subscribers:

/nab2nabs/:apikey/send?url=http%3A%2F%2Fbabasworld.free.fr%2Fvivelevent.mp3