Examples

import Pastebin

Fetch a paste by key.

response = Pastebin.getraw("Lt9PtFc4")
Pastebin.content(response)
"Hola mundo"

Create a Pastebin client using only a devKey.

client = Pastebin.Client(ENV["PASTEBIN_DEVKEY"])
Pastebin.Client(...) -- no userKey

Paste something (to expire in 1 hour)

response = Pastebin.paste(client, "A test", "Hola Pastebin"; expire="1H")
Pastebin.Response(true, "https://pastebin.com/nkzHTbnL")

Extract the key of the created paste

key = Pastebin.parsekey(response)
"nkzHTbnL"

We can now access the created paste using this key

Pastebin.content(Pastebin.getraw(key))
"Hola Pastebin"

This page was generated using Literate.jl.