UNPKG

@amityco/ts-sdk-react-native

Version:

Amity Social Cloud Typescript SDK

23 lines 852 B
/** * ```js * import { PostRepository } from '@amityco/ts-sdk-react-native' * * let posts = [] * const unsub = PostRepository.getLiveRoomPosts({ * targetType: Amity.PostTargetType, * targetId: Amity.Post['targetId'], * }, response => merge(posts, response.data)) * ``` * * Observe all mutations on a list of {@link Amity.Post} for a given live room * * @param params.targetType the type of the target * @param params.targetId the ID of the target * @param callback the function to call when new data are available * @param config * @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the posts * * @category Posts Live Collection */ export declare const getLiveRoomPosts: (callback: Amity.LiveCollectionCallback<Amity.Post>) => Amity.Unsubscriber; //# sourceMappingURL=getLiveRoomPosts.d.ts.map