Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
j3lte committed Nov 21, 2023
1 parent 2e5ec2c commit 8138431
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@

Pastebin Client for Deno/Node

> Work in progress!
> This is a fork of [pastebin-ts](https://github.com/j3lte/pastebin-ts), which is updated to work with both Deno and Node
> This is a fork of pastebin-ts, which is updated to work with Deno and Node
## Capabilities

- Create a new paste (with optional title, format, privacy and expiration)
- Get a paste (raw)
- Delete a paste
- Get user info
- Get user pastes

## API

API Docs can be found on Deno Docs: [https://deno.land/x/pastedeno/mod.ts](https://deno.land/x/pastedeno/mod.ts)

## Usage

```ts
// Import the module directly from Github for now
import { Pastebin, PrivacyLevel, ExpirationTime } from "https://raw.githubusercontent.com/j3lte/pastedeno/main/mod.ts";
import { Pastebin, PrivacyLevel, ExpirationTime } from "https://deno.land/x/pastedeno/mod.ts";

// Create a new Pastebin instance
const pastebin = new Pastebin({
Expand All @@ -30,7 +39,7 @@ const paste = await pastebin.createPaste({

// paste will contain the paste url

// Get the raw paste
// Get the raw paste (either use the paste url or the paste id)
const raw = await pastebin.getPaste('https://pastebin.com/XXXXXXXX');

// Get the raw private paste
Expand Down

0 comments on commit 8138431

Please sign in to comment.