igpapi — Instagram private API Simulator for Node.js (API reference) 4.14.0
    Preparing search index...

    Interface ScreenFeedSource<Input, Cursor, Data, FE, FR>

    Where a feed screen's pages come from — fields of the feed screen's own declaration, flat beside its id, kind and input: the feed's own request, its cursor (how an answer continues the cursor) and its defaults, as defineFeed takes them — each of the three moves in on its own, never a whole FeedConfig (its items function is refused by the declaration's own items) — the cursor of the first page from the screen's input (start), and the schema of one page's answer (response), checked like any screen's data; it holds what cursor reads.

    interface ScreenFeedSource<Input, Cursor, Data, FE, FR> {
        cursor: (page: Data) => { hasMore: boolean; input: Partial<Cursor> };
        cursorSchema?: ScreenCodec<Cursor>;
        defaults?: () => Partial<Cursor>;
        request: (cursor: Cursor) => Effect<Data, FE, FR>;
        response: ScreenCodec<Data>;
        start: (input: Input) => Cursor;
    }

    Type Parameters

    • Input
    • Cursor
    • Data
    • FE
    • FR
    Index

    Properties

    cursor: (page: Data) => { hasMore: boolean; input: Partial<Cursor> }
    cursorSchema?: ScreenCodec<Cursor>

    The schema of one cursor, when the declaration has one: a checkpoint stores the cursor of the page after the deepest one and decodes it through this schema before any page is requested with it. Without one the stored cursor is taken as the JSON object the encoder wrote, as it always was.

    defaults?: () => Partial<Cursor>
    request: (cursor: Cursor) => Effect<Data, FE, FR>
    response: ScreenCodec<Data>
    start: (input: Input) => Cursor