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

    Function feedTimelineCursorOf

    • Internal

      The brick's continuation rule, plus what the state must keep: the opening's id, the next position and the last taken_at. Both facts are derived from the page's entries — the next position is one past the last entry's, and the last taken_at is the last media's — so the page holds nothing but the answer. A page with no entries carries no position to continue from; the feed's continuation rule ends it when it names no cursor, and a cursor without a position asks the feed from its first entry. Workspace-only: the two screens use it and the published declarations leave it out.

      Parameters

      • page: {
            entries: readonly (
                | {
                    key: string;
                    media: {
                        carousel_media?: readonly { pk: string }[];
                        code: string;
                        id: string;
                        injected?: { ad_id?: string } | null;
                        inventory_source?: string;
                        logging_info_token?: string;
                        media_type: number;
                        mezql_token?: string;
                        pk?: string;
                        product_type?: string;
                        taken_at?: number;
                        user?: { pk: string; username: string };
                    };
                    position: number;
                    slide?: number;
                    type: "post";
                }
                | {
                    key: string;
                    media: {
                        carousel_media?: readonly { pk: string }[];
                        code: string;
                        id: string;
                        injected?: { ad_id?: string } | null;
                        inventory_source?: string;
                        logging_info_token?: string;
                        media_type: number;
                        mezql_token?: string;
                        pk?: string;
                        product_type?: string;
                        taken_at?: number;
                        user?: { pk: string; username: string };
                    };
                    position: number;
                    type: "reel";
                }
                | {
                    key: string;
                    media: {
                        carousel_media?: readonly { pk: string }[];
                        code: string;
                        id: string;
                        injected?: { ad_id?: string } | null;
                        inventory_source?: string;
                        logging_info_token?: string;
                        media_type: number;
                        mezql_token?: string;
                        pk?: string;
                        product_type?: string;
                        taken_at?: number;
                        user?: { pk: string; username: string };
                    };
                    position: number;
                    type: "ad";
                }
                | {
                    key: string;
                    media: {
                        carousel_media?: readonly { pk: string }[];
                        code: string;
                        id: string;
                        injected?: { ad_id?: string } | null;
                        inventory_source?: string;
                        logging_info_token?: string;
                        media_type: number;
                        mezql_token?: string;
                        pk?: string;
                        product_type?: string;
                        taken_at?: number;
                        user?: { pk: string; username: string };
                    };
                    position: number;
                    source: string;
                    type: "explore_story";
                }
                | {
                    key: string;
                    position: number;
                    subtitle: string;
                    title: string;
                    type: "caught-up";
                }
                | {
                    key: string;
                    position: number;
                    posts: readonly {
                        id?: string;
                        media_type?: number;
                        user?: { pk: string; username: string };
                    }[];
                    title: string;
                    type: "threads";
                }
                | {
                    key: string;
                    position: number;
                    reels: readonly {
                        id?: string;
                        is_eof?: boolean
                        | null;
                        media_type?: number;
                        pk?: string;
                        user?: { pk: string; username: string };
                    }[];
                    title: string;
                    type: "suggested-reels";
                }
                | {
                    item: { kind: "unknown"; kindKey?: string; raw: Json };
                    key: string;
                    position: number;
                    type: "unknown";
                }
            )[];
            more_available: boolean;
            next_max_id?: string;
            requestId: string;
        }

      Returns {
          hasMore: boolean;
          input:
              | {
                  lastTakenAt?: number;
                  nextMaxId: string;
                  position?: number;
                  requestId: string;
              }
              | {
                  lastTakenAt?: number;
                  nextMaxId?: undefined;
                  position?: number;
                  requestId: string;
              };
      }