Picnic.Api
1.1.1
dotnet add package Picnic.Api --version 1.1.1
NuGet\Install-Package Picnic.Api -Version 1.1.1
<PackageReference Include="Picnic.Api" Version="1.1.1" />
<PackageVersion Include="Picnic.Api" Version="1.1.1" />
<PackageReference Include="Picnic.Api" />
paket add Picnic.Api --version 1.1.1
#r "nuget: Picnic.Api, 1.1.1"
#:package Picnic.Api@1.1.1
#addin nuget:?package=Picnic.Api&version=1.1.1
#tool nuget:?package=Picnic.Api&version=1.1.1
Picnic.Api
A C# wrapper for the unofficial Picnic API.
This library is based on the Node.js library picnic-api and on the Python library python-picnic-api. This library is inspired by the mentioned projects and adapted for C#.
This API is unofficial and is not affiliated with Picnic in any way.
Getting Started
1. Install the package
dotnet add package Picnic.Api
2. Create a client
using Picnic.Api;
using Picnic.Api.Configuration;
var client = new PicnicClient(new PicnicApiOptions
{
CountryCode = "DE",
ApiVersion = "15"
});
3. Login
var login = await client.LoginAsync("your-email-or-phone", "your-password");
if (login.SecondFactorAuthenticationRequired)
{
await client.Auth.Generate2FaCodeAsync(Picnic.Api.Models.Auth.TwoFactorChannel.Email);
// Ask the user for the code received by email/sms.
await client.Auth.Verify2FaCodeAsync("123456");
}
4. Make your first calls
var user = await client.User.GetUserDetailsAsync();
var results = await client.Catalog.SearchAsync("milch");
var cart = await client.Cart.GetCartAsync();
5. Optional: reuse an existing auth token
using Picnic.Api;
using Picnic.Api.Configuration;
var client = new PicnicClient(new PicnicApiOptions
{
AuthToken = "your-existing-auth-token",
CountryCode = "DE"
});
Contributing
Contributions are welcome.
If you find a bug, have an idea for improvement, or want to add a feature, feel free to open an issue or submit a pull request.
Disclaimer
Use this library at your own risk.
You are fully responsible for how you use this project and for complying with Picnic terms, policies, and applicable laws.
You are responsible for your own use of this library, including any account limitations, warnings, temporary suspensions, permanent bans, data loss, or any other consequences that may result.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.