import { Tpy } from "https://deno.land/x/tpy@v1.0.0-RC/mod.ts";
The central entity for interacting with the Pylon API; the entrypoint.
Methods
Gets all guilds a user can edit with Pylon. More specifically, all guilds which the user is an administrator.
getNamespaceItems<T>(namespace: string, deploymentID?: string): Promise<KV.GET.ItemsFlattened<T> | undefined>
Gets all the namespace items under the given deployment ID.
httpRaw<T>(): Promise<T>
Makes a request to the API and creates possible errors according to the response.
KV(namespace: string, deploymentID?: string)
Creates a new TpyKV
instantiation, much like the Pylon SDK's KVNamespace class.
publishDeployment(body: Deployment.POST.Request<false>, deploymentID?: string)
Makes a POST request to publish a deployment; returns details of the new deployment.
readyRequest(method: HTTPVerbs, other?: RequestInit): RequestInit
A factory function with default headers, allowing optional specificity.