Examples

import Pasteee

To access the Paste.ee API, you need an Application Key. You can create yours at the following link: https://paste.ee/account/api (after logging in to Paste.ee) In that page, first create an Application, then click ACTIONS -> AUTHORIZATION PAGE, and then SUBMIT. You will see the Application Key.

In the following examples I assume that you have assigned your Application Key to the appkey variable.

Create a paste that expires in one hour.

id = Pasteee.paste(appkey, "Hola mundo"; expiration="3600")
"UxQ4T"

The paste can be retrieved using the returned id.

paste = Pasteee.get(appkey, id)
Dict{String, Any} with 7 entries:
  "views"       => 0
  "created_at"  => "2022-02-05T21:26:58+00:00"
  "expires_at"  => "2022-02-05T22:26:58+00:00"
  "sections"    => Any[Dict{String, Any}("name"=>"New Paste 1", "id"=>0, "conte…
  "id"          => "UxQ4T"
  "encrypted"   => false
  "description" => ""

Paste.ee pastes are organized in sections. Here we retrieve the contents of section number 1 of the paste we just created.

paste["sections"][1]["contents"]
"Hola mundo"

Delete the paste.

Pasteee.delete(appkey, id)

This page was generated using Literate.jl.