8000 GitHub - bsaustin/simplepaste: Pastebin API golang implementation
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bsaustin/simplepaste

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang bindings for the Pastebin.com API

Not all methods were implemented, but they are coming soon!

All methods are fairly self explanatory, and reading the godoc page should explain everything. If something isn't clear, open an issue or submit a pull request.

The scope of this project is just to provide a wrapper around the API without any additional features.

Examples

package main

import(
	"fmt"
	"github.com/ninedraft/simplepaste"
)

func main(){
	api = simplepaste.NewAPI("Your API key")
	
	paste := simplepaste.NewPaste("Paste name", "Paste text")
	paste.ExpireDate = simplepaste.Month //your paste will be available for one month
	link, err := api.SendPaste(paste) //returns link to the paste and nil, if everything is ok
	if err != nil {
		panic(err)
	}
	fmt.Println(link)	
}

About

Pastebin API golang implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 72.4%
  • Go 27.6%
0