Skip to content

Ronmi/pastebin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc

pastebin API binding for golang.

api := pastebin.API{Key: "my_dev_key"}

// post a public paste
uri, err := api.Post(&paste.Post{
    Title: "markdown test",
    Content: `my cool content`,
    Format: "markdown",
    ExpireAt: pastebin.In1Y,
])
if err != nil {
    // handle error
}
log.Printf("new paste url: %s", uri)

// grab all pastes created by user "darius"
ukey, err := api.UserKey("darius", "my_password")
if err != nil {
    // handle error here
}
posts, err := api.List(ukey, 0)
if err != nil {
    // handle error here
}

for _, p := range posts {
    log.Printf("Post#%s: %s", p.Key, p.Title)
}

License

WTFPL

About

pastebin API binding for golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages