@amityco/ts-sdk-react-native
Version:
Amity Social Cloud Typescript SDK
32 lines • 943 B
TypeScript
/**
* ```js
* import { getPost } from '@amityco/ts-sdk-react-native'
* const { data: post } = await getPost('foobar')
* ```
*
* Fetches a {@link Amity.Post} object
*
* @param postId the ID of the {@link Amity.Post} to fetch
* @returns the associated {@link Amity.Post} object
*
* @category Post API
* @async
*/
export declare const getPost: {
(postId: Amity.Post['postId']): Promise<Amity.Cached<Amity.InternalPost>>;
/**
* ```js
* import { getPost } from '@amityco/ts-sdk-react-native'
* const { data: post } = getPost.locally('foobar')
* ```
*
* Fetches a {@link Amity.Post} object from cache
*
* @param postId the ID of the {@link Amity.Post} to fetch
* @returns the associated {@link Amity.Post} object
*
* @category Post API
*/
locally(postId: Amity.Post['postId']): Amity.Cached<Amity.InternalPost> | undefined;
};
//# sourceMappingURL=getPost.d.ts.map