mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-26 06:11:14 +00:00
Adding ResolveObject to the API. Fixes #27
This commit is contained in:
parent
1ce122e4be
commit
5ef1a2d508
3 changed files with 19 additions and 0 deletions
|
@ -56,6 +56,8 @@ import {
|
|||
GetSiteConfig,
|
||||
GetSiteConfigResponse,
|
||||
GetSiteResponse,
|
||||
ResolveObject,
|
||||
ResolveObjectResponse,
|
||||
SaveSiteConfig,
|
||||
Search,
|
||||
SearchResponse,
|
||||
|
@ -152,6 +154,10 @@ export class LemmyHttp {
|
|||
return this.wrapper(HttpType.Get, '/search', form);
|
||||
}
|
||||
|
||||
async resolveObject(form: ResolveObject): Promise<ResolveObjectResponse> {
|
||||
return this.wrapper(HttpType.Get, '/resolve_object', form);
|
||||
}
|
||||
|
||||
async createCommunity(form: CreateCommunity): Promise<CommunityResponse> {
|
||||
return this.wrapper(HttpType.Post, '/community', form);
|
||||
}
|
||||
|
|
|
@ -128,3 +128,15 @@ export interface FederatedInstances {
|
|||
allowed?: string[];
|
||||
blocked?: string[];
|
||||
}
|
||||
|
||||
export interface ResolveObject {
|
||||
q: string;
|
||||
auth?: string;
|
||||
}
|
||||
|
||||
export interface ResolveObjectResponse {
|
||||
comment?: CommentView;
|
||||
post?: PostView;
|
||||
community?: CommunityView;
|
||||
person?: PersonViewSafe;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ export enum UserOperation {
|
|||
AddAdmin,
|
||||
BanPerson,
|
||||
Search,
|
||||
ResolveObject,
|
||||
MarkAllAsRead,
|
||||
SaveUserSettings,
|
||||
TransferCommunity,
|
||||
|
|
Loading…
Reference in a new issue