Announcing EasyMWS – a NuGet package replacement for AMTU

We’ve integrated with Amazon MarketplaceWebServices for some time, but we’ve done that by generating the relevant feeds as files and placing them on a server for the Amazon-provided AMTU to manage sending those files and retrieving them.

Recently we’ve needed to expand our integration to automatically download reports on a regular schedule and analyze them within one of our applications – we took this opportunity to build something that can have the simplicity of AMTU usage within our own application (i.e. without needing a shared hard drive location).

It looks like this:

var client = new EasyMwsClient(
   AmazonRegion.Europe,
   "sellerId",
   "accessKey",
   "secretAccessKey");

IReportRequestFactoryInventory reportRequestFactory =
   new ReportRequestFactoryInventory();
var marketplaces =
   new MwsMarketplaceGroup(marketplace: MwsMarketplace.UK);
var allListingReport =
   reportRequestFactory.AllListingsReport(marketplaces);

client.QueueReport(allListingReport,
  CallbackMethod, // To call once the report is available.
  new { foo = "bar" }); // Additional data for callback

while(true) {
   client.Poll();
   Thread.Sleep(2);
}

That client.Poll() method gives you the control to run this as a command line app, a windows service, or a distributed set of applications using Hangfire.

There are tons of improvements we could add, we’ve focussed on the code needed to do what we need to do and as such there is a lot of functionality that still needs to be added.

Full instructions are available on our GitHub page, where you can also fork the project to add the functionality you nned.

Try it out by downloading the package from NuGet today!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s