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

    Function defineFeedScreen

    • Declares a feed screen: a screen whose handle is one page of a feed and whose items are that page's entries. items declares them like any item list — { at, key, item } or { at, key, by, variants } — over one page's answer.

      • start, defaults, request, cursor and response are where the pages come from (ScreenFeedSource), flat on the declaration.
      • enter({ input, navigate, firstPage }) is the burst: firstPage requests the first page, exactly once (else it dies with ScreenFeedPageError, a defect of the declaration).
      • The handle is the page: items holds its items, and none of the answer's own fields is on it. nextPage() — on every instance — requests the page after the one it is asked of with that page's own cursor, shows its items (their enters run, one after another, under the screen's frame) and returns a new instance for it, never changing the one it was asked of; undefined, with nothing sent, when the answer said no page follows. It is a transition: the screen must be on top and holds the top while the page loads. The frame keeps its deepest page, and every return to it (back, a tab switch, a retrace, a restore) hands out that page's instance.
      • The state is only the cursor of the page after the first (ScreenFeedState).
      • leave and resume are the screen's visits, as for any screen. A feed's items have no visits (the app has none): theirs never run.

      The definition is pipeable: defineFeedScreen({ … }).pipe(swipeableFeed({ … })) makes the swipeable variant; a feed's stream is its items — by page requests, or, on a swipeable feed, by swipes. A trail stores an item of a later page by its list, key and page number; a retrace requests the pages up to it again, fresh.

      Type Parameters

      • const Id extends
            | "LoginHomepage"
            | "LoginHomeCds"
            | "LandingScreen"
            | "LoginTwoFactorEntrypoint"
            | "LoginTwoFactorMethodPicker"
            | "LoginTwoFactorEnterTotpCode"
            | "AccountRecoverySearchCds"
            | "AccountRecoverySearch"
            | "AccountRecoveryAuthenticationConfirmation"
            | "AccountRecoveryEmailCode"
            | "RegistrationPhoneNumber"
            | "RegistrationConfirmationCode"
            | "RegistrationPassword"
            | "RegistrationBirthday"
            | "RegistrationName"
            | "RegistrationUsername"
            | "RegistrationTermsOfService"
            | "SaveCredentials"
            | "AccountRecoverySuccessLocationPermission"
            | "FeedTimeline"
            | "PostOpenedFromLink"
            | "ReelsViewer"
            | "MediaComments"
            | "RepostNoteEditor"
            | "Explore"
            | "SearchInput"
            | "SearchResultsTopTab"
            | "SearchResultsAccountsTab"
            | "UserProfile"
            | "ProfileMediaTab"
            | "MyProfile"
            | "MyProfileMediaTab"
            | "EditProfile"
            | "EditProfileBio"
            | "EditProfileUsername"
            | "EditProfileLinks"
            | "EditProfileAddLink"
            | "ProfilePostsFeed"
            | "FeedTimelineFollowing"
            | "UserProfileReelsTab"
            | "DirectInbox"
            | "DirectRecipientPicker"
            | "DirectThread"
            | "DirectCustomizeChat"
            | "DirectThreadThemePicker"
            | "DirectThreadDetails"
            | "DirectThreadSharedMedia"
            | "DirectThreadNicknames"
            | "DirectThreadNicknameChange"
            | "DirectGroupNameAndPhotoEditor"
            | "PostingGalleryPicker"
            | "PostingPostEdit"
            | "PostingNewPost"
            | "PostingCamera"
            | "PostingCameraGallery"
            | "PostingReelEditor"
            | "PostingNewReel"
            | "PostingPostVideoCameraGallery"
            | "PostingPostVideoCamera"
            | "PostingReelCamera"
            | "PostingStoryCameraHost"
            | "PostingStoryCameraGallery"
            | "PostingPostVideoNewReel"
            | "PostingStoryPhotoEditor"
            | "PostingStoryVideoEditor"
            | "PostingStoryStickerTray"
            | "PostingStoryMusicStickerEditor"
            | "PostingStoryShareSheet"
            | "PostingStoryAlsoShareTo"
            | "PostingStoryDoneCamera"
            | "PostingStoryMusicSearchHost"
            | "PostingMusicBrowser"
            | "PostingMusicSearchResults"
            | "PostingReelMusicOverlayDetail"
            | "PostingReelMusicEditor"
            | "ChallengeSelectVerifyMethod"
            | "ChallengeVerifyCode"
            | "ChallengeSubmitPhone"
            | "ChallengeSetNewPassword"
            | "ChallengeAddBirthday"
            | "ChallengeLoginReview"
            | "ChallengeAccountTemporarilyLocked"
            | "ChallengeEscalationInformation"
            | "ChallengeReviewContactPointChange"
            | "ChallengeScrapingWarning"
            | "ChallengeWebRecaptcha"
            | "ChallengeWebSetNewPassword"
            | "ChallengeTextCaptcha"
            | "ChallengeRecaptcha"
            | "ChallengeSetContactPoint"
            | "ChallengeContactPointCode"
            | "ChallengeAuthenticityWizard"
            | "ChallengeAwaitingReview"
            | "ChallengeThanksForProvidingInfo"
            | "ChallengeAccountSuspended"
      • const Kind extends EnterableScreenKind
      • Input
      • Cursor
      • Data extends object
      • FE
      • FR
      • E
      • R
      • Actions extends Readonly<Record<string, ScreenMember<never>>>
      • const Page
      • RL = never
      • Host extends object = never

      Parameters

      Returns FeedScreen<
          Id,
          Kind,
          Input,
          Cursor,
          Data,
          FE,
          FR,
          ScreenDataError
          | FE
          | E,
          FR | R | RL,
          Actions,
          Page,
          Host,
      >