Pastebin GO API
The work is currently in Progress, but PRs are welcome!
go get https://github.com/arminaaki/gopastebin
import "https://github.com/arminaaki/gopastebin"
//Create pastbin API Client
client, _ := NewClient(&AccountRequest{
APIDevKey: os.Getenv("PASTEBIN_API_DEV_KEY"),
APIUserName: os.Getenv("PASTEBIN_API_USER_NAME"),
APIUserPassword: os.Getenv("PASTEBIN_API_USER_PASSWORD"),
})
// Create a past
_, _, err := client.Paste.Create(nil, &PasteRequest{
APIPasteName: "main.rb",
APIPasteCode: "puts \"Hello World!\"",
APIPasteFormat: "ruby",
APIPastePrivate: APIOptionPrivate,
APIPasteExpireDate: "1M",
})
if err != nil {
panic(err)
}