1.1.1 • Published 4 months ago

paste.gg v1.1.1

Weekly downloads
69
License
MIT
Repository
-
Last release
4 months ago

Links

API Documentation GitHub NPM

Usages

Install the stable version

npm install paste.gg

yarn add paste.gg

Install the beta version (git is required)

npm install SerenModz21/paste.gg#beta

yarn add SerenModz21/paste.gg#beta

Get started with paste.gg

const PasteGG = require("paste.gg");
// or
import PasteGG from "paste.gg";

// If you want to be anonymous
const pasteGG = new PasteGG()

// If you want to use an api key
const pasteGG = new PasteGG("apiKeyHere")

Get information about a post

// if you would like to exclude file contents
await pasteGG.get("idHere")

// If you would like to include file contents
await pasteGG.get("idHere", true)

Post a new paste (Click here for more options)

await pasteGG.post({
  name: "Paste name", // Optional
  description: "Paste description", // Optional
  expires: "2020-12-21T02:25:56.428Z", // Optional (must be a UTC ISO 8601 string)
  files: [{
    name: "file.txt", // Optional
    content: {
      format: "text",
      value: "This is where the file content will go"
    }
  }]
})

Delete a paste (auth/deletion key needed)

// Delete with deletion key
await pasteGG.delete("idHere", "deletionKeyHere")

// Delete with auth key if not set in constructor
await pasteGG.delete("idHere", "authKeyHere") 

// Leave blank if auth key is in the class constructor
await pasteGG.delete("idHere")

Update the post

await pasteGG.update("idHere", {
  name: "new name", // Optional (if you want to remove the name)
  description: "new description"
})

Contributions are more than welcome. If you would like to add to this API, you can open a pull request as I haven't added everything on the API, only the things that will get used more often.

Copyright © SerenModz21 2018 - 2021

1.1.1

5 months ago

1.1.0

5 months ago

1.1.0-next.b8789e1

5 months ago

1.1.0-next.04514ef

5 months ago

1.1.0-next.ab53c6b

5 months ago

1.1.2-next.3d29f62

4 months ago

1.1.0-next.bdf45f0

5 months ago

1.1.2-next.86c929d

5 months ago

1.1.1-next.dd32ace

5 months ago

1.1.0-next.003c613

5 months ago

1.1.0-next.f432f06

5 months ago

1.1.0-next.ef40058

5 months ago

1.1.0-next.e7c6eea

5 months ago

1.1.0-next.0ce246d

5 months ago

1.1.2-next.39c159c

5 months ago

1.1.0-next.9701240

5 months ago

1.1.2-next.8d3ca8e

4 months ago

1.1.2-next.b99fbd6

4 months ago

1.1.0-next.7c58f63

5 months ago

1.1.2-next.2b830bc

5 months ago

1.1.0-next.e40b1ae

5 months ago

1.1.0-next.8d0198e

5 months ago

1.1.0-next.283b6e5

5 months ago

1.1.2-next.4db0824

4 months ago

1.1.1-next.bb3a870

5 months ago

1.1.0-next.ce8b236

5 months ago

1.1.0-next.1535392

5 months ago

1.1.0-next.664077d

5 months ago

1.1.1-next.b180a3c

5 months ago

1.0.5

3 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago