Spresso.Sdk.Core 1.0.1-beta

This is a prerelease version of Spresso.Sdk.Core.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Spresso.Sdk.Core --version 1.0.1-beta
NuGet\Install-Package Spresso.Sdk.Core -Version 1.0.1-beta
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Spresso.Sdk.Core" Version="1.0.1-beta" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Spresso.Sdk.Core --version 1.0.1-beta
#r "nuget: Spresso.Sdk.Core, 1.0.1-beta"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Spresso.Sdk.Core as a Cake Addin
#addin nuget:?package=Spresso.Sdk.Core&version=1.0.1-beta&prerelease

// Install Spresso.Sdk.Core as a Cake Tool
#tool nuget:?package=Spresso.Sdk.Core&version=1.0.1-beta&prerelease

Spresso.Sdk

This repository contains all of the .net SDKs for calling the Spresso API.

A more detailed writeup is forthcoming.

Spresso.Sdk.Core

Core SDKs that deal with

  • Authentication
  • Resilient API calls

Note that for best performance, AuthTokenHandler should should be a singleton and live for the lifetime of the application.

Spresso.Sdk.PriceOptimizations

SDK that works with the Spresso Price Optimzation APIs to fetch optimal prices for a given set of products.

Note that for best performance, PriceOptimizationsHandler should should be a singleton and live for the lifetime of the application.

By default this SDK tries it's best to always return an answer in a fixed amount of time, using default pricing. The IsSuccess will let you know if the response came from the API or was the fallback price. The Error property will inform you of what went wrong.

Fallback behavior can be disabled by setting PriceOptimizationsHandlerOptions.ThrowOnFailure to true.

Quickstart
var authTokenHandler = new AuthTokenHandler("myClientId", "mySecret");
var priceOptimizationHandler = new PriceOptimizationsHandler(authTokenHandler);
var response = await priceOptimizationHandler.GetPriceOptimizationAsync(new GetPriceOptimizationRequest(deviceId: "device123", itemId: "item42", defaultPrice: 9.99m, userId: "9635345345534ad3", overrideToDefaultPrice: false));
Building

This solution is setup to use the nuke build system (still a work in progress).

Assuming you have nuke installed, you can run the following commands:

To build the solution, run nuke from the root of the repository.

To target a specific SDK, run nuke --target-project <your sdk of choice>

To build and run tests, run nuke test or nuke test --target-project <your sdk>

To get a list of sdks, run nuke listsdks

For help, run nuke --help If you do not have nuke installed, you can also substitute nuke with build.cmd, build.ps1, or build.sh, depending on your platform.

Benchmarks

To run benchmarks, build tests/Spresso.Sdk.Benchmarks in Release mode, then run Spresso.Sdk.Benchmarks.

Historical Benchmarks

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Spresso.Sdk.Core:

Package Downloads
Spresso.Sdk.PriceOptimizations

SDK that works with the Spresso Price Optimization APIs to fetch optimal prices for a given set of products.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 162 10/5/2023
1.0.2-beta 143 2/16/2023
1.0.1-beta 141 2/15/2023

Initial release