Перейти к содержимому

itd-api / Post

Interface: Post

Defined in: models/content.ts:55

Пост ленты, стены или профиля.

Properties

attachments

ts
attachments: Attachment[];

Defined in: models/content.ts:61


author

ts
author: Author;

Defined in: models/content.ts:60


comments?

ts
optional comments?: Comment[];

Defined in: models/content.ts:97

Топовые комментарии. Приходят только в ответе GET /api/posts/{id}.

В списках постов поле отсутствует.


commentsCount

ts
commentsCount: number;

Defined in: models/content.ts:63


content

ts
content: string;

Defined in: models/content.ts:57


createdAt

ts
createdAt: string;

Defined in: models/content.ts:85


dominantEmoji?

ts
optional dominantEmoji?: string | null;

Defined in: models/content.ts:82

Преобладающая реакция — эмодзи либо null.


editedAt?

ts
optional editedAt?: string | null;

Defined in: models/content.ts:84

Когда пост отредактировали. null, если не редактировали.


id

ts
id: string;

Defined in: models/content.ts:56


isLiked

ts
isLiked: boolean;

Defined in: models/content.ts:71

Поставили ли вы реакцию.


isOwner

ts
isOwner: boolean;

Defined in: models/content.ts:77

Ваш ли это пост.


isReposted

ts
isReposted: boolean;

Defined in: models/content.ts:73

Делали ли вы репост.


isViewed?

ts
optional isViewed?: boolean;

Defined in: models/content.ts:75

Засчитан ли просмотр.


likesCount

ts
likesCount: number;

Defined in: models/content.ts:62


originalPost?

ts
optional originalPost?: Post | null;

Defined in: models/content.ts:79

Исходный пост, если это репост.


poll?

ts
optional poll?: Poll | null;

Defined in: models/content.ts:80


repostsCount

ts
repostsCount: number;

Defined in: models/content.ts:64


spans

ts
spans: Span[];

Defined in: models/content.ts:59

Разметка текста. Передаётся без изменений, см. Span.


viewsCount

ts
viewsCount: number;

Defined in: models/content.ts:65


vs?

ts
optional vs?: string;

Defined in: models/content.ts:91

Служебная метка показа для телеметрии.

Нужна только эндпоинтам itd.telemetry.*. В остальных случаях игнорируйте.


wallRecipient?

ts
optional wallRecipient?: Author | null;

Defined in: models/content.ts:69

Владелец стены. Приходит не во всех ответах.


wallRecipientId

ts
wallRecipientId: string | null;

Defined in: models/content.ts:67

Чья это стена, если пост опубликован не у себя.

Документация itd-api