Spresso.Sdk.PriceOptimizations
1.1.0-beta
See the version list below for details.
dotnet add package Spresso.Sdk.PriceOptimizations --version 1.1.0-beta
NuGet\Install-Package Spresso.Sdk.PriceOptimizations -Version 1.1.0-beta
<PackageReference Include="Spresso.Sdk.PriceOptimizations" Version="1.1.0-beta" />
paket add Spresso.Sdk.PriceOptimizations --version 1.1.0-beta
#r "nuget: Spresso.Sdk.PriceOptimizations, 1.1.0-beta"
// Install Spresso.Sdk.PriceOptimizations as a Cake Addin #addin nuget:?package=Spresso.Sdk.PriceOptimizations&version=1.1.0-beta&prerelease // Install Spresso.Sdk.PriceOptimizations as a Cake Tool #tool nuget:?package=Spresso.Sdk.PriceOptimizations&version=1.1.0-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
.
Product | Versions 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. |
-
.NETStandard 2.1
- Microsoft.Extensions.Caching.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Caching.Memory (>= 6.0.1)
- Spresso.Sdk.Core (>= 1.0.1-beta)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.1.1 | 182 | 10/5/2023 |
1.1.1-beta | 157 | 2/16/2023 |
1.1.0-beta | 149 | 2/15/2023 |
Initial release