feat(client): Add getInstanceExtendedDescription

This commit is contained in:
Jesse Wierzbinski 2024-06-07 12:10:52 -10:00
parent a50c80c866
commit 20cafb859b
No known key found for this signature in database
2 changed files with 20 additions and 1 deletions

View file

@ -9,7 +9,7 @@ import type { Context } from "../types/context";
import type { Conversation } from "../types/conversation"; import type { Conversation } from "../types/conversation";
import type { Emoji } from "../types/emoji"; import type { Emoji } from "../types/emoji";
import type { FeaturedTag } from "../types/featured_tag"; import type { FeaturedTag } from "../types/featured_tag";
import type { Instance } from "../types/instance"; import type { ExtendedDescription, Instance } from "../types/instance";
import type { List } from "../types/list"; import type { List } from "../types/list";
import type { Marker } from "../types/marker"; import type { Marker } from "../types/marker";
import type { Notification } from "../types/notification"; import type { Notification } from "../types/notification";
@ -994,6 +994,20 @@ export class LysandClient extends BaseClient {
return this.get<Account[]>(`/api/v1/directory?${params}`, extra); return this.get<Account[]>(`/api/v1/directory?${params}`, extra);
} }
/**
* GET /api/v1/instance/extended_description
*
* @returns Instance's extended description.
*/
public getInstanceExtendedDescription(
extra?: RequestInit,
): Promise<Output<ExtendedDescription>> {
return this.get<ExtendedDescription>(
"/api/v1/instance/extended_description",
extra,
);
}
/** /**
* GET /api/v1/instance/peers * GET /api/v1/instance/peers
* *

View file

@ -79,3 +79,8 @@ export type InstanceRule = {
id: string; id: string;
text: string; text: string;
}; };
export type ExtendedDescription = {
updated_at: string;
content: string;
};