Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Marketwatcher Source Code: Fetching Windows Phone App Reviews

DZone's Guide to

Marketwatcher Source Code: Fetching Windows Phone App Reviews

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

I’ve just committed the first working version of Marketwatcher, a library for Windows Phone 7 which can be used to fetch application reviews from the Windows Phone Marketplace. It is available from the GitHub and it’s licensed with MIT, so you can use the library anyway you want.

Get the source code.

Get the compiled binaries.

Sample application

The Marketwatcher GitHub repository contains a sample app which can used to check out how the library is used.

Review data

At the moment an app review is described with the following model:

public string Id { get; private set; }
public string Author { get; private set; }
public DateTime UpdateTime { get; private set; }
public int Score { get; private set; }
public string Comments { get; private set; }
public string CountryCode { get; private set; }

Implementation

Marketwatcher uses the Reactive Extensions. It may be that the RX is dropped at some point in favor of a implementation that doesn’t require any other DLLs. The library also references System.ServiceModel.Syndication which is used to parse the review data. The referenced dlls are included in the repository.

Usage

Marketwatcher.Fetcher:

Use either:

public IObservable<List<Review>> FetchReviewsForApp(string appId)

or

public IObservable<List<Review>> FetchReviewsForAppFromOneMarketplace(string appId, string marketplaceCountryCode)

In the app you can subscribe to these. The following example is from the sample app:

var fetcher = new Fetcher();
 
progressIndicator.IsVisible = true;
 
var reviews = new ObservableCollection<Review>();
Items.ItemsSource = reviews;
 
fetcher.FetchReviewsForApp(this.Appid.Text)
    .ObserveOn(SynchronizationContext.Current)
    .Subscribe(x =>
                   {
                       foreach (var review in x)
                       {
                           reviews.Add(review);
                       }
                   },
                   ex => Debug.WriteLine("error"),
                   () => progressIndicator.IsVisible = false);

Nuget

The Nuget package is coming!

Download

GitHub repository.

Binaries.


Source:  http://mikaelkoskinen.net/post/Marketwatcher-WP7-Class-Library-and-Sample-Application-for-Fetching-Application-Reviews-from-the-Marketplace.aspx


Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}