Categorygithub.com/simonmartyr/picnic-api
repositorypackage
1.2.2
Repository: https://github.com/simonmartyr/picnic-api.git
Documentation: pkg.go.dev

# README

Picnic-API

workflow

This is an (unofficial) Go wrapper for working with the Picnic WebAPI.

Installation

To install the library:

go get github.com/simonmartyr/picnic-api

Getting started

To create a client & authenticate you and choose to provide a valid access token or credentials to manually authenticate with.

//authentication with a token
package main
import picnic "github.com/simonmartyr/picnic-api"

func main() {
    client := picnic.New(&http.Client{},
		picnic.WithToken("your accessToken"),
    )
}

or

//authentication using auth credentials
package main
import picnic "github.com/simonmartyr/picnic-api"

func main() {
    client := picnic.New(&http.Client{},
        picnic.WithUserName("[email protected]"),
        picnic.WithHashedPassword("hashedPassword"),
    )
	err := client.Authenticate()
	if err != nil {
		panic(err.Error())
    }
}

Demo Project

For a complete example of the API being used, checkout picnic-tui

References & Credits

Thanks to the efforts of MRVDH which documented the API.

Support

Static Badge