import { Feed } from '../core/feed' ; import { Expose } from 'class-transformer' ; export class MediaStickerResponsesFeed < T , I > extends Feed < T , I > { name : string ; rootName : string ; itemName : string ; stickerId : string ; mediaId : string ; @ Expose ( ) private maxId : string = undefined ; async items ( ) { const response = await this . request ( ) ; return response [ this . rootName ] [ this . itemName ] ; } async request ( ) { const { body } = await this . client . request . send ( { url : `/api/v1/media/${ this . mediaId }/${ this . stickerId }/${ this . name }/` , method : 'GET' , qs : { max_id : this . maxId || void 0 , } , } ) ; this . state = body ; return body ; } protected set state ( response ) { this . maxId = response [ this . rootName ] . max_id ; this . moreAvailable = response [ this . rootName ] . more_available ; } }