Skip to content

Unofficial Go wrapper for the online supermarket Picnic API

License

Notifications You must be signed in to change notification settings

simonmartyr/picnic-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Unofficial Go wrapper for the online supermarket Picnic API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages