@amityco/ts-sdk-react-native
Version:
Amity Social Cloud Typescript SDK
21 lines • 683 B
TypeScript
/**
* ```js
* import { PollRepository } from '@amityco/ts-sdk-react-native';
*
* let poll;
*
* const unsub = PollRepository.getPoll(commentId, response => {
* poll = response.data;
* });
* ```
*
* Observe all mutation on a given {@link Amity.Poll}
*
* @param pollId the ID of the poll to observe
* @param callback the function to call when new data are available
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the poll
*
* @category Poll Live Object
*/
export declare const getPoll: (pollId: Amity.Poll['pollId'], callback: Amity.LiveObjectCallback<Amity.Poll>) => Amity.Unsubscriber;
//# sourceMappingURL=getPoll.d.ts.map