Staff
@smokeballdev/smokeball-client-sdk
Interface: Api
Entry point for staff to Smokeball.
Methods
all()
all():
Promise
<Staff
[]>
Gets all staff members.
Returns
Promise
<Staff
[]>
all staff members.
Example
get()
get(
staffId
):Promise
<Staff
>
Gets the staff member associated to the specified staff id.
Parameters
staffId
string
the staff member to retrieve.
Returns
Promise
<Staff
>
the specified staff member.
Example
observe()
observe(
callback
):void
Creates a subscription for all staff. Check against the staff member you are interested in within your registered callback.
To prevent doubling up of changes, notifications triggered by the staff update call will not be notified here.
Only one subscription will be made per session. Regardless of how many times this function is called, the last registered callback will be used.
Parameters
callback
(staff
) => void
the function to execute when a change is made to staff in Smokeball.
Returns
void