mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-12-23 11:21:27 +00:00
parent
f67a5c12f6
commit
357bf2f011
4 changed files with 27 additions and 0 deletions
|
@ -94,6 +94,7 @@ import {
|
||||||
ListPostReports,
|
ListPostReports,
|
||||||
ListPostReportsResponse,
|
ListPostReportsResponse,
|
||||||
LockPost,
|
LockPost,
|
||||||
|
MarkPostAsRead,
|
||||||
PostReportResponse,
|
PostReportResponse,
|
||||||
PostResponse,
|
PostResponse,
|
||||||
RemovePost,
|
RemovePost,
|
||||||
|
@ -362,6 +363,14 @@ export class LemmyHttp {
|
||||||
return this.wrapper(HttpType.Post, "/post/remove", form);
|
return this.wrapper(HttpType.Post, "/post/remove", form);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mark a post as read.
|
||||||
|
* `HTTP.POST /post/mark_as_read`
|
||||||
|
*/
|
||||||
|
async markPostAsRead(form: MarkPostAsRead): Promise<PostResponse> {
|
||||||
|
return this.wrapper(HttpType.Post, "/post/mark_as_read", form);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A moderator can lock a post ( IE disable new comments ).
|
* A moderator can lock a post ( IE disable new comments ).
|
||||||
* `HTTP.POST /post/lock`
|
* `HTTP.POST /post/lock`
|
||||||
|
|
|
@ -87,6 +87,15 @@ export interface RemovePost {
|
||||||
auth: string;
|
auth: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marks a post as read.
|
||||||
|
*/
|
||||||
|
export interface MarkPostAsRead {
|
||||||
|
post_id: number;
|
||||||
|
read: boolean;
|
||||||
|
auth: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Only admins and mods can lock a post.
|
* Only admins and mods can lock a post.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,6 +26,7 @@ export enum UserOperation {
|
||||||
RemovePost,
|
RemovePost,
|
||||||
LockPost,
|
LockPost,
|
||||||
StickyPost,
|
StickyPost,
|
||||||
|
MarkPostAsRead,
|
||||||
SavePost,
|
SavePost,
|
||||||
EditCommunity,
|
EditCommunity,
|
||||||
DeleteCommunity,
|
DeleteCommunity,
|
||||||
|
|
|
@ -61,6 +61,7 @@ import {
|
||||||
GetSiteMetadata,
|
GetSiteMetadata,
|
||||||
ListPostReports,
|
ListPostReports,
|
||||||
LockPost,
|
LockPost,
|
||||||
|
MarkPostAsRead,
|
||||||
RemovePost,
|
RemovePost,
|
||||||
ResolvePostReport,
|
ResolvePostReport,
|
||||||
SavePost,
|
SavePost,
|
||||||
|
@ -332,6 +333,13 @@ export class LemmyWebsocket {
|
||||||
return wrapper(UserOperation.StickyPost, form);
|
return wrapper(UserOperation.StickyPost, form);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mark a post as read.
|
||||||
|
*/
|
||||||
|
markPostAsRead(form: MarkPostAsRead) {
|
||||||
|
return wrapper(UserOperation.MarkPostAsRead, form);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save a post.
|
* Save a post.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue