Hannibalystic.Amazon.Client 1.0.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package Hannibalystic.Amazon.Client --version 1.0.0.4
NuGet\Install-Package Hannibalystic.Amazon.Client -Version 1.0.0.4
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="Hannibalystic.Amazon.Client" Version="1.0.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hannibalystic.Amazon.Client --version 1.0.0.4
#r "nuget: Hannibalystic.Amazon.Client, 1.0.0.4"
#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 Hannibalystic.Amazon.Client as a Cake Addin
#addin nuget:?package=Hannibalystic.Amazon.Client&version=1.0.0.4

// Install Hannibalystic.Amazon.Client as a Cake Tool
#tool nuget:?package=Hannibalystic.Amazon.Client&version=1.0.0.4

Selling Partner API Authentication/Authorization Library

This is a fork of the Amazon SP-API SDK. I have replaced the RateLimiter library because the original simply does not work. There are other changes as well. See the source code at selling-partner-api-models. If you would like additional SP-API models added to the library, please contact me directly.

LWAAuthorizationSigner

Obtains and signs a request with an access token from LWA (Login with Amazon) for the specified endpoint using the provided LWA credentials.

Example

using RestSharp;
using Amazon.SellingPartnerAPIAA;

string resource = "/my/api/path";
RestClient restClient = new RestClient("https://...");
IRestRequest restRequest = new RestRequest(resource, Method.GET);

// Seller APIs
LWAAuthorizationCredentials lwaAuthorizationCredentials = new LWAAuthorizationCredentials
{
    ClientId = "...",
    ClientSecret = "",
    RefreshToken = "",
    Endpoint = new Uri("...")
};

/* Sellerless APIs
The Selling Partner API scopes can be retrieved from the ScopeConstants class and used to specify a list of scopes of an LWAAuthorizationCredentials instance. */
LWAAuthorizationCredentials lwaAuthorizationCredentials = new LWAAuthorizationCredentials
{
    ClientId = "...",
    ClientSecret = "",
    Scopes = new List<string>() { ScopeConstants.ScopeNotificationsAPI, ScopeConstants.ScopeMigrationAPI }
    Endpoint = new Uri("...")
};

restRequest = new LWAAuthorizationSigner(lwaAuthorizationCredentials).Sign(restRequest);  

Note the IRestRequest reference is treated as mutable when signed.

AWSSigV4Signer

Signs a request with AWS Signature Version 4 using the provided AWS developer account credentials.

Example

using RestSharp;
using Amazon.SellingPartnerAPIAA;

string resource = "/my/api/path";
RestClient restClient = new RestClient("https://...");
IRestRequest restRequest = new RestRequest(resource, Method.GET);

AWSAuthenticationCredentials awsAuthenticationCredentials = new AWSAuthenticationCredentials 
{
    AccessKeyId = "..."
    SecretKey = "..."
    Region = "..."
};

restRequest = new AWSSigV4Signer(awsAuthenticationCredentials)
    .Sign(restRequest, restClient.BaseUrl.Host);

Note the IRestRequest reference is treated as mutable when signed.

RateLimitConfiguration

Interface to set and get rateLimit configurations that are used with RateLimiter. RateLimiter is used on client side to restrict the rate at which requests are made. RateLimiter Configuration takes Permit, rate which requests are made and TimeOut

Example

RateLimitConfiguration rateLimitConfig = new RateLimitConfigurationOnRequests
            {
                RateLimitPermit = ..,
                WaitTimeOutInMilliSeconds = ...
            }; 

Resources

This package features Mustache templates designed for use with swagger codegen. When you build Selling Partner API Swagger models with these templates, they help generate a rich SDK with functionality to invoke Selling Partner APIs built in. The templates are located in resources/swagger-codegen.

Building

This package is built as a .NET Standard Library via a Visual Studio Solution with implementation and test projects. The Visual Studio Community Edition can be obtained for free from Microsoft and used to build the solution and generate a .dll assembly which can be imported into other projects.

Dependencies

All dependencies can be installed via NuGet

  • RestSharp - 106.12.0
  • Newtonsoft.Json 12.0.3
  • NETStandard.Library 2.0.3 (platform-specific implementation requirements are documented on the Microsoft .NET Guide)

License

Swagger Codegen templates are subject to the Swagger Codegen License.

All other work licensed as follows:

Copyright 2020 Amazon.com, Inc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this library except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.0.0.7 161 4/18/2024
1.0.0.6 85 4/18/2024
1.0.0.5 88 4/17/2024
1.0.0.4 415 8/15/2023
1.0.0.3 388 2/27/2023
1.0.0.2 246 2/25/2023
1.0.0.1 243 2/25/2023
1.0.0 225 2/24/2023