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

    Function feedTimelinePageOf

    • Internal

      Reads one answer into a page, carrying the request id it was fetched with: a missing or misshapen feed_items/more_available, an Explore story without its id, or a media without its container id or shortcode is ScreenDataError — the feed's data check — never an empty feed. An entry of a kind the library does not model is not an error: feed_items is an open union, and the entry becomes the page's unknown entry. Workspace-only: both timeline feeds read their answers through it, and the published declarations leave it out.

      Parameters

      • answer: unknown
      • requestId: string
      • offset: number
      • screen: "FeedTimeline" | "FeedTimelineFollowing"

      Returns Effect<
          {
              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;
          },
          ScreenDataError,
      >