Interface: AccountApi
The logged-in account itself.
Methods
activity()
activity(): Promise<Activity>;The activity feed (likes, comments, new followers), first page. Marks nothing as seen.
Returns
Promise<Activity>
links()
links(): Promise<object[]>;The links listed on the profile.
Returns
Promise<object[]>
me()
me(): Promise<Record<string, unknown>>;The current account's own profile; also the simplest check that auth is accepted.
Returns
Promise<Record<string, unknown>>
removeLinks()
removeLinks(linkIds): Promise<object[]>;Removes profile links by link_id, returning the list that remains.
Parameters
| Parameter | Type |
|---|---|
linkIds | string[] |
Returns
Promise<object[]>
removePicture()
removePicture(): Promise<{
[key: string]: unknown;
biography?: string;
external_url?: string | null;
follower_count?: number | null;
following_count?: number | null;
full_name?: string;
is_private?: boolean;
is_verified?: boolean;
media_count?: number | null;
pk?: string;
profile_pic_url?: string | null;
username?: string;
}>;Removes the profile picture, back to the default avatar.
Returns
Promise<{ [key: string]: unknown; biography?: string; external_url?: string | null; follower_count?: number | null; following_count?: number | null; full_name?: string; is_private?: boolean; is_verified?: boolean; media_count?: number | null; pk?: string; profile_pic_url?: string | null; username?: string; }>
setBiography()
setBiography(text): Promise<{
[key: string]: unknown;
biography?: string;
external_url?: string | null;
follower_count?: number | null;
following_count?: number | null;
full_name?: string;
is_private?: boolean;
is_verified?: boolean;
media_count?: number | null;
pk?: string;
profile_pic_url?: string | null;
username?: string;
}>;Sets the account's biography, returning the updated profile.
Parameters
| Parameter | Type |
|---|---|
text | string |
Returns
Promise<{ [key: string]: unknown; biography?: string; external_url?: string | null; follower_count?: number | null; following_count?: number | null; full_name?: string; is_private?: boolean; is_verified?: boolean; media_count?: number | null; pk?: string; profile_pic_url?: string | null; username?: string; }>
setLink()
setLink(url, title?): Promise<object[]>;Sets the profile link, returning the list as the profile now holds it.
Parameters
| Parameter | Type |
|---|---|
url | string |
title? | string |
Returns
Promise<object[]>
setName()
setName(name): Promise<{
[key: string]: unknown;
biography?: string;
external_url?: string | null;
follower_count?: number | null;
following_count?: number | null;
full_name?: string;
is_private?: boolean;
is_verified?: boolean;
media_count?: number | null;
pk?: string;
profile_pic_url?: string | null;
username?: string;
}>;Changes the display name (Instagram limits this to a couple of changes per 14 days).
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
Promise<{ [key: string]: unknown; biography?: string; external_url?: string | null; follower_count?: number | null; following_count?: number | null; full_name?: string; is_private?: boolean; is_verified?: boolean; media_count?: number | null; pk?: string; profile_pic_url?: string | null; username?: string; }>
setPicture()
setPicture(jpeg): Promise<{
[key: string]: unknown;
biography?: string;
external_url?: string | null;
follower_count?: number | null;
following_count?: number | null;
full_name?: string;
is_private?: boolean;
is_verified?: boolean;
media_count?: number | null;
pk?: string;
profile_pic_url?: string | null;
username?: string;
}>;Replaces the profile picture with a JPEG, returning the updated profile.
Parameters
| Parameter | Type |
|---|---|
jpeg | Uint8Array |
Returns
Promise<{ [key: string]: unknown; biography?: string; external_url?: string | null; follower_count?: number | null; following_count?: number | null; full_name?: string; is_private?: boolean; is_verified?: boolean; media_count?: number | null; pk?: string; profile_pic_url?: string | null; username?: string; }>