Skip to main content

APIs

OBR

The base API to interact with Owlbear Rodeo

Reference

Properties

NAMETYPEDESCRIPTION
isReadybooleanTrue if the SDK has been loaded and is ready to send messages
isAvailablebooleanTrue if the current site is embedded in an instance of Owlbear Rodeo

Example

if (OBR.isAvailable) {
// The current site is embedded in Owlbear Rodeo
}

Methods

onReady

onReady(callback);

Parameters

NAMETYPEDESCRIPTION
callback() => voidA callback for when when the SDK is ready

Returns a function that when called will unsubscribe from change events.

Example

/**
* Use an `onReady` event with a React `useEffect`.
* `onReady` returns an unsubscribe event to make this easy.
*/
useEffect(
() =>
OBR.onReady(() => {
// interact with the SDK
}),
[]
);