Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pastedeno/src/lib/Pastebin.ts>AbstractPastebin

Universal Pastebin client for Deno/Node
Latest
class AbstractPastebin
Abstract
import { AbstractPastebin } from "https://deno.land/x/pastedeno@0.6.2/src/lib/Pastebin.ts";

Constructors

new
AbstractPastebin(config?: IPastebinOptions | string | null, options?: { fetch?: globalThis.fetch; parseXML?: (_xml: string) => Record<string, string>; })

Properties

readonly
config: IPastebinOptions
readonly
debug: boolean
readonly
hasDevKey: boolean
requestTimeout: number

Methods

createPaste(options: ICreatePasteTextOptions): Promise<string>

Create a paste

deletePaste(pasteID: string): Promise<string>

Delete a paste

getPaste(id: string, isPrivate?): Promise<string>

Get the content of a paste

getUserInfo(): Promise<User>

Get user information

listUserPastes(limit?): Promise<Paste[]>

List all pastes of a user

setDebug(debug: boolean): void

Static Properties

version: string