Skip to content

simonmartyr/picnic-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 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("user@emailaddress.com"),
        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

9 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages