MountainWarehouse.EasyMWS 0.5.3

Suggested Alternatives

CSharpAmazonSpAPI

Additional Details

EasyMWS is integrating with the Amazon MWS API which is being deprecated (in August 2023 for reports, and in March 2024 for feeds).
There are no plans to make EasyMws work with the new Amazon SP-API.

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

// Install MountainWarehouse.EasyMWS as a Cake Tool
#tool nuget:?package=MountainWarehouse.EasyMWS&version=0.5.3                

EasyMWS

Description

EasyMWS is a .NET library that intends to simplify the interaction with the Amazon Marketplace Web Services API. It tries to do that by abstracting away the request/check/download cycle for downloading reports / submitting feeds. Detailed logs describing the state of either lifecycle can be accessed.

Downloading reports from Amazon MWS

EasyMws provides factories that can be used to generate requests for downloading reports from Amazon MWS. One has to specify the report type, any required/optional arguments needed by Amazon to process the report and a set of amazon seller account credentials. (Adding support for more reports is still ongoing).

A user can create requests to download reports from amazon and can add these requests to an internal EasyMws queue.

When queuing a request the user also needs to provide a static method reference. This method will be invoked once the request has been completed, in order to provide access to the report content.

All that is left to do is making periodic calls to the Poll() method. This method handles all the lifecycle of requesting reports from amazon. A call every 2 to 5 minutes is recommended in order to make sure request throttling won't happen.

Once a report has been downloaded, the callback method will be invoked and will provide access to the report content.

Submitting feeds to Amazon MWS

A user can also create requests to submit feeds to amazon (feed content has to be provided separately), and add the requests to an internal queue.

When queuing a request the user also needs to provide a static method reference. This method will be invoked once the request has been completed, in order to provide access to the feed submission result report content.

All that is left to do is making periodic calls to the Poll() method. This method also handles all the lifecycle of submitting feeds to amazon. A call every 2 to 5 minutes is recommended in order to make sure request throttling won't happen.

Once a feed has been submitted to amazon and a feed processing result report has been downloaded, the callback method will be invoked and will provide access to the feed processing result report.

Code usage - (this is only to demonstrate how to use the client.)

public void Main(object[] arguments) {
	var euClient = new EasyMwsClient(AmazonRegion.Europe, "euSellerId", "accessKey", "secretAccessKey");
	var marketplaces = new MwsMarketplaceGroup(marketplace: MwsMarketplace.UK)
					.AddMarketplace(MwsMarketplace.Germany)
					.AddMarketplace(MwsMarketplace.France);
	IReportRequestFactoryInventory reportRequestFactory = new ReportRequestFactoryInventory();
	var allListingsReportProperties = reportRequestFactory.AllListingsReport(marketplaces);
	var reportFilename = $"AllListingsReport_{DateTime.UtcNow.ToFileTimeUtc()}";
	euClient.QueueReport(allListingsReportProperties, DoSomethingWithDownloadedReport, reportFilename);

	while(true)
	{
		Tread.Sleep(Timespan.FromMinutes(2));
		euClient.Poll();
	}
}

public static void DoSomethingWithDownloadedReport(Stream reportContent, object callbackData)
{
	var filename = (string) callbackData;
	var path = @"C:\AmazonReports";
	var streamReader = new StreamReader(reportContent);
	File.WriteAllText($"{path}/{filename}", streamReader.ReadToEnd());
}

Details / Requirements

The library is a wrapper for the Amazon MarketplaceWebService .NET implementation. The library was build using .NET Standard 2.0 and as such, it inherits the following minimum requirements :

  • Supporting platforms : .NET Framework 4.6.1, .NET Core 2.0 or later.
  • Visual Studio 2017 15.3 or later. If you only need to consume the library, you can do that even in Visual Studio 2015 but you'll need NuGet client 3.6 or higher (download from Nuget.org/downloads). More information here.

Library dependencies (all the dependencies are available on the NuGet platform):

  • .NETStandard 2.0.0
  • Microsoft.EntityFrameworkCore 2.1.0
  • Microsoft.EntityFrameworkCore.SqlServer 2.1.0
  • Microsoft.EntityFrameworkCore.Proxies 2.1.0
  • Microsoft.EntityFrameworkCore.Tools 2.1.0
  • Microsoft.Extensions.Configuration.Json 2.1.0
  • Microsoft.Extensions.Configuration.Xml 2.1.0
  • System.Configuration.ConfigurationManager 4.5.0

Package available on NuGet.org at this location. tags : Amazon, MWS, MarketplaceWebService.

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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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

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
5.5.0 205 10/2/2023 5.5.0 is deprecated because it is no longer maintained.
5.4.6 750 3/9/2021 5.4.6 is deprecated because it is no longer maintained.
5.4.5 596 11/23/2020 5.4.5 is deprecated because it is no longer maintained.
5.4.4 606 11/23/2020 5.4.4 is deprecated because it is no longer maintained.
5.4.3 619 11/23/2020 5.4.3 is deprecated because it is no longer maintained.
5.4.2 560 11/19/2020 5.4.2 is deprecated because it is no longer maintained.
5.4.1 613 11/16/2020 5.4.1 is deprecated because it is no longer maintained.
5.4.0 624 11/16/2020 5.4.0 is deprecated because it is no longer maintained.
5.1.1 646 6/15/2020 5.1.1 is deprecated because it is no longer maintained.
5.0.2 672 6/10/2020 5.0.2 is deprecated because it is no longer maintained.
5.0.1 723 2/25/2020 5.0.1 is deprecated because it is no longer maintained.
5.0.0 730 2/24/2020 5.0.0 is deprecated because it is no longer maintained.
4.0.0 773 1/22/2020 4.0.0 is deprecated because it is no longer maintained.
3.6.1 715 1/14/2020 3.6.1 is deprecated because it is no longer maintained.
3.5.0 799 4/18/2019 3.5.0 is deprecated because it is no longer maintained.
3.4.0 762 4/11/2019 3.4.0 is deprecated because it is no longer maintained.
3.3.2 748 3/28/2019 3.3.2 is deprecated because it is no longer maintained.
3.1.2 773 3/27/2019 3.1.2 is deprecated because it is no longer maintained.
3.1.1 841 1/29/2019 3.1.1 is deprecated because it is no longer maintained.
3.1.0 895 11/19/2018 3.1.0 is deprecated because it is no longer maintained.
3.0.0 922 10/29/2018 3.0.0 is deprecated because it is no longer maintained.
2.0.0 820 10/29/2018 2.0.0 is deprecated because it is no longer maintained.
1.2.0 891 10/11/2018 1.2.0 is deprecated because it is no longer maintained.
1.1.1 931 10/3/2018 1.1.1 is deprecated because it is no longer maintained.
1.1.0 1,050 8/2/2018 1.1.0 is deprecated because it is no longer maintained.
1.0.0 1,104 7/3/2018 1.0.0 is deprecated because it is no longer maintained.
0.5.3 1,123 6/11/2018 0.5.3 is deprecated because it is no longer maintained.
0.4.2 1,213 5/30/2018 0.4.2 is deprecated because it is no longer maintained.
0.4.1 1,169 5/30/2018 0.4.1 is deprecated because it is no longer maintained.
0.4.0 1,094 5/30/2018 0.4.0 is deprecated because it is no longer maintained.
0.3.0 1,051 5/29/2018 0.3.0 is deprecated because it is no longer maintained.
0.2.3 1,026 5/9/2018 0.2.3 is deprecated because it is no longer maintained.
0.2.1 1,068 4/25/2018 0.2.1 is deprecated because it is no longer maintained.
0.2.0 1,093 4/19/2018 0.2.0 is deprecated because it is no longer maintained.
0.1.9 1,058 4/11/2018 0.1.9 is deprecated because it is no longer maintained.
0.1.8 1,039 4/11/2018 0.1.8 is deprecated because it is no longer maintained.
0.1.7 1,067 4/10/2018 0.1.7 is deprecated because it is no longer maintained.
0.1.1 1,052 3/21/2018 0.1.1 is deprecated because it is no longer maintained.