UNPKG

@amityco/ts-sdk-react-native

Version:

Amity Social Cloud Typescript SDK

26 lines (23 loc) 701 B
import { PaginationController } from '~/core/liveCollection/PaginationController'; export class CustomRankingGlobalFeedPaginationController extends PaginationController< 'post', Amity.CustomRankingGlobalFeedLiveCollection > { async getRequest( queryParams: Amity.CustomRankingGlobalFeedLiveCollection, token: string | undefined, ) { const { limit, ...params } = queryParams; const options = token ? { token } : { limit }; const { data: queryResponse } = await this.http.get<Amity.PostPayload & Amity.Pagination>( `/api/v5/me/global-feeds`, { params: { ...params, options, }, }, ); return queryResponse; } }