Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.72 KB

README.md

File metadata and controls

41 lines (27 loc) · 1.72 KB

go-pingen-sdk

Build Status Go Report Card GitHub release (latest by date)

A personal hobby project that implements the API of postal provider pingen.com in Go.

Not affiliated in any way with pingen.com

Usage

Warning This API sends real letters and costs money. After you send a letter it is validated and printed. There is only a very short timeframe before printing where the sending process can be canceled.

Import it with

    go get github.com/goneup/go-pingen-sdk

Simple usage with. A full example can be found at full_example.go.

    clientID := os.Getenv("CLIENT_ID")
    clientSecret := os.Getenv("CLIENT_SECRET")
    org := os.Getenv("PINGEN_ORG")
    useProd := true

    c := pingen.NewClient(clientID, clientSecret, useProd, org, context.Background())
    c.ListLetters()
	

For a complete overview of methods, refer to the go package documentation

API Information

Documentation

You need a API key, type Client Credentials. Instructions can be found here. The organisation UUID can be found in any URL on the website.

Pingen has a seperate staging environment if you want to test the complete flow, see here