From 6e0c38196b71050bb16f46d9010b6310f019bdc5 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 24 Sep 2024 15:40:34 -0400 Subject: [PATCH] Adding tagline http calls. --- src/http.ts | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/http.ts b/src/http.ts index c95eaf9..51cb755 100644 --- a/src/http.ts +++ b/src/http.ts @@ -145,6 +145,12 @@ import { ListMedia } from "./types/ListMedia"; import { ListMediaResponse } from "./types/ListMediaResponse"; import { AuthenticateWithOauth } from "./types/AuthenticateWithOauth"; import { GetRegistrationApplication } from "./types/GetRegistrationApplication"; +import { CreateTagline } from "./types/CreateTagline"; +import { TaglineResponse } from "./types/TaglineResponse"; +import { UpdateTagline } from "./types/UpdateTagline"; +import { DeleteTagline } from "./types/DeleteTagline"; +import { ListTaglines } from "./types/ListTaglines"; +import { ListTaglinesResponse } from "./types/ListTaglinesResponse"; enum HttpType { Get = "GET", @@ -1439,6 +1445,58 @@ export class LemmyHttp { ); } + /** + * Create a new tagline + * + * `HTTP.POST /tagline` + */ + createTagline(form: CreateTagline) { + return this.#wrapper( + HttpType.Post, + "/tagline", + form, + ); + } + + /** + * Edit an existing tagline + * + * `HTTP.PUT /tagline` + */ + editTagline(form: UpdateTagline) { + return this.#wrapper( + HttpType.Put, + "/tagline", + form, + ); + } + + /** + * Delete a tagline + * + * `HTTP.Post /tagline/delete` + */ + deleteTagline(form: DeleteTagline) { + return this.#wrapper( + HttpType.Post, + "/tagline/delete", + form, + ); + } + + /** + * List taglines + * + * `HTTP.GET /tagline/list` + */ + listTaglines(form: ListTaglines) { + return this.#wrapper( + HttpType.Get, + "/tagline/list", + form, + ); + } + /** * Create a new oauth provider method *