Interface: HighlightApi
Story highlights on a profile. Reading is open to anyone who may see the profile.
Methods
create()
create(
title,
storyIds,
options?
): Promise<{
[key: string]: unknown;
id: string;
items?: object[];
media_count?: number | null;
title?: string;
user?: {
[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;
};
}>;Creates a highlight from some of the account's own stories (full ids, or bare pks).
Parameters
| Parameter | Type |
|---|---|
title | string |
storyIds | readonly string[] |
options? | CreateHighlightOptions |
Returns
Promise<{ [key: string]: unknown; id: string; items?: object[]; media_count?: number | null; title?: string; user?: { [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; }; }>
delete()
delete(highlightId): Promise<void>;Deletes a highlight; its stories are not deleted.
Parameters
| Parameter | Type |
|---|---|
highlightId | string |
Returns
Promise<void>
edit()
edit(highlightId, options): Promise<{
[key: string]: unknown;
id: string;
items?: object[];
media_count?: number | null;
title?: string;
user?: {
[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 a highlight's title, stories or cover.
Parameters
| Parameter | Type |
|---|---|
highlightId | string |
options | EditHighlightOptions |
Returns
Promise<{ [key: string]: unknown; id: string; items?: object[]; media_count?: number | null; title?: string; user?: { [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; }; }>
info()
info(highlightId): Promise<{
[key: string]: unknown;
id: string;
items?: object[];
media_count?: number | null;
title?: string;
user?: {
[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;
};
}>;One highlight with its stories. Accepts highlight:123 or 123.
Parameters
| Parameter | Type |
|---|---|
highlightId | string |
Returns
Promise<{ [key: string]: unknown; id: string; items?: object[]; media_count?: number | null; title?: string; user?: { [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; }; }>
list()
list(userId): Promise<object[]>;The highlights on a profile, without their stories.
Parameters
| Parameter | Type |
|---|---|
userId | string |
Returns
Promise<object[]>