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

    Interface PostOpenedFromLinkActions

    The actions of PostOpenedFromLinkScreen: the methods you call on its handle while the screen is open.

    interface PostOpenedFromLinkActions {
        like: (
            ...args: [],
        ) => Effect<
            | {
                data: {
                    xig_media_like: {
                        media: {
                            __typename?: string;
                            has_liked: boolean;
                            id: string;
                            strong_id__?: string;
                        };
                    };
                };
            } & { raw: ActionRaw }
            | MediaLikeRestResponse & { raw: ActionRaw },

                | IgApiError
                | RequestError
                | ParseError
                | TransportError
                | SchemaError
                | GraphqlRootFieldMissingError
                | ScreenEnterConcurrentError
                | CarouselSlideNotFoundError
                | CarouselSlidesNotLoadedError,
            never,
        >;
        openComments: (
            ...args: readonly [
                { commentSessionId?: string; rankingSessionId?: string },
            ],
        ) => Effect<
            AssembledHandle<
                "MediaComments",
                "screen",
                | {
                    commentSessionId: string;
                    createdMediaNoteIds: readonly string[];
                    mediaId: string;
                    slide?: { index: number; mediaId: string };
                    surface: "feed";
                }
                | {
                    commentSessionId: string;
                    createdMediaNoteIds: readonly string[];
                    mediaId: string;
                    surface: "reels";
                },
                MediaCommentsActions,
                Record<never, never>,
                ScreenHandle,
                "required",
                true,
                "mediaId",
                AndroidScreens,
            >,

                | IgApiError
                | RequestError
                | ParseError
                | TransportError
                | ScreenEnterConcurrentError
                | ScreenDataError
                | ScreenEdgeInputError,
            never,
        >;
        repost: (
            ...args: [text?: string],
        ) => Effect<
            { note: MediaCreateNoteResponse; trackingToken: string } & {
                raw: ActionRaw;
            },
            | IgApiError
            | RequestError
            | ParseError
            | TransportError
            | SchemaError
            | GraphqlRootFieldMissingError
            | MediaRepostTextRejectedError
            | ScreenEnterConcurrentError
            | CarouselSlideNotFoundError
            | CarouselSlidesNotLoadedError,
            never,
        >;
        swipeToSlide: <Self extends ScreenHandle>(
            this: Self,
            ...args: [index: number],
        ) => Effect<
            Self,
            ScreenDataActionFailure<
                CarouselSlideNotFoundError
                | CarouselSlidesNotLoadedError,
            >,
            never,
        >;
    }
    Index

    Properties

    like: (
        ...args: [],
    ) => Effect<
        | {
            data: {
                xig_media_like: {
                    media: {
                        __typename?: string;
                        has_liked: boolean;
                        id: string;
                        strong_id__?: string;
                    };
                };
            };
        } & { raw: ActionRaw }
        | MediaLikeRestResponse & { raw: ActionRaw },

            | IgApiError
            | RequestError
            | ParseError
            | TransportError
            | SchemaError
            | GraphqlRootFieldMissingError
            | ScreenEnterConcurrentError
            | CarouselSlideNotFoundError
            | CarouselSlidesNotLoadedError,
        never,
    >

    Taps the heart on the post (on the slide in front, for a carousel). Answers the like's result.

    openComments: (
        ...args: readonly [
            { commentSessionId?: string; rankingSessionId?: string },
        ],
    ) => Effect<
        AssembledHandle<
            "MediaComments",
            "screen",
            | {
                commentSessionId: string;
                createdMediaNoteIds: readonly string[];
                mediaId: string;
                slide?: { index: number; mediaId: string };
                surface: "feed";
            }
            | {
                commentSessionId: string;
                createdMediaNoteIds: readonly string[];
                mediaId: string;
                surface: "reels";
            },
            MediaCommentsActions,
            Record<never, never>,
            ScreenHandle,
            "required",
            true,
            "mediaId",
            AndroidScreens,
        >,

            | IgApiError
            | RequestError
            | ParseError
            | TransportError
            | ScreenEnterConcurrentError
            | ScreenDataError
            | ScreenEdgeInputError,
        never,
    >

    Taps the comment icon and opens the comments sheet over the post (options set the sheet up; a ranking session is sent only if you declare one). Answers the sheet's handle.

    repost: (
        ...args: [text?: string],
    ) => Effect<
        { note: MediaCreateNoteResponse; trackingToken: string } & {
            raw: ActionRaw;
        },
        | IgApiError
        | RequestError
        | ParseError
        | TransportError
        | SchemaError
        | GraphqlRootFieldMissingError
        | MediaRepostTextRejectedError
        | ScreenEnterConcurrentError
        | CarouselSlideNotFoundError
        | CarouselSlidesNotLoadedError,
        never,
    >

    Taps Repost: likes the post, then writes the repost note, both on the slide in front for a carousel. text rides in the note where the app takes it there and follows the blank note as the text mutation where it does not; the library sends the text as given on either build. Answers the note and the token its text echoes.

    swipeToSlide: <Self extends ScreenHandle>(
        this: Self,
        ...args: [index: number],
    ) => Effect<
        Self,
        ScreenDataActionFailure<
            CarouselSlideNotFoundError
            | CarouselSlidesNotLoadedError,
        >,
        never,
    >

    Swipes the carousel to slide index (zero-based). Nothing is sent. Answers the post shown again with that slide in front; continue from it. A slide the post does not hold fails with CarouselSlideNotFoundError.