bs-sonos

BuckleScript bindings for sonos used to control one or more Sonos speakers.

Usage no npm install needed!

<script type="module">
  import bsSonos from 'https://cdn.skypack.dev/bs-sonos';
</script>

README

bs-sonos

Build Status

BuckleScript bindings for sonos used to control one or more Sonos speakers.

Example

open Methods;

/* Connect to a Sonos speaker using its IP */
let device = Device.make("192.168.0.1");

/* Queue a track and start playing it */
Js.Promise.(
  device->Queue.asLast("spotify:track:4fK6E2UywZTJIa5kWnCD6x")
  |> then_(_ => device->PlayerControl.play())
);

For all available methods, see src/Methods.re and for all response parser see src/Decode.re

Projects using bindings

Add yours if you are using the bindings