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")
"xXOMr"
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-08T20:56:40+00:00"
"expires_at" => "2022-02-08T21:56:40+00:00"
"sections" => Any[Dict{String, Any}("name"=>"New Paste 1", "id"=>0, "conte…
"id" => "xXOMr"
"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.