MountainWarehouse.EasyMWS
0.5.3
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.
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
<PackageReference Include="MountainWarehouse.EasyMWS" Version="0.5.3" />
paket add MountainWarehouse.EasyMWS --version 0.5.3
#r "nuget: MountainWarehouse.EasyMWS, 0.5.3"
// 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 | 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 | 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. |
-
.NETStandard 2.0
- Microsoft.EntityFrameworkCore (>= 2.1.0)
- Microsoft.EntityFrameworkCore.Proxies (>= 2.1.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 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)
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 | 209 | 10/2/2023 | |
5.4.6 | 754 | 3/9/2021 | |
5.4.5 | 600 | 11/23/2020 | |
5.4.4 | 610 | 11/23/2020 | |
5.4.3 | 623 | 11/23/2020 | |
5.4.2 | 564 | 11/19/2020 | |
5.4.1 | 617 | 11/16/2020 | |
5.4.0 | 628 | 11/16/2020 | |
5.1.1 | 655 | 6/15/2020 | |
5.0.2 | 676 | 6/10/2020 | |
5.0.1 | 727 | 2/25/2020 | |
5.0.0 | 734 | 2/24/2020 | |
4.0.0 | 777 | 1/22/2020 | |
3.6.1 | 719 | 1/14/2020 | |
3.5.0 | 803 | 4/18/2019 | |
3.4.0 | 766 | 4/11/2019 | |
3.3.2 | 752 | 3/28/2019 | |
3.1.2 | 777 | 3/27/2019 | |
3.1.1 | 845 | 1/29/2019 | |
3.1.0 | 899 | 11/19/2018 | |
3.0.0 | 928 | 10/29/2018 | |
2.0.0 | 826 | 10/29/2018 | |
1.2.0 | 897 | 10/11/2018 | |
1.1.1 | 939 | 10/3/2018 | |
1.1.0 | 1,060 | 8/2/2018 | |
1.0.0 | 1,110 | 7/3/2018 | |
0.5.3 | 1,129 | 6/11/2018 | |
0.4.2 | 1,219 | 5/30/2018 | |
0.4.1 | 1,175 | 5/30/2018 | |
0.4.0 | 1,106 | 5/30/2018 | |
0.3.0 | 1,057 | 5/29/2018 | |
0.2.3 | 1,032 | 5/9/2018 | |
0.2.1 | 1,074 | 4/25/2018 | |
0.2.0 | 1,099 | 4/19/2018 | |
0.1.9 | 1,064 | 4/11/2018 | |
0.1.8 | 1,045 | 4/11/2018 | |
0.1.7 | 1,073 | 4/10/2018 | |
0.1.1 | 1,058 | 3/21/2018 |