[banshee/amazon] Fix typo, add some more random API testing
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee/amazon] Fix typo, add some more random API testing
- Date: Tue, 5 May 2009 18:55:23 -0400 (EDT)
commit d8e09a806481925e4ec82b12a0b5a30e5400c152
Author: Gabriel Burt <gabriel burt gmail com>
Date: Tue May 5 17:43:05 2009 -0500
Fix typo, add some more random API testing
---
.../Banshee.Amazon/Banshee.Amazon.addin.xml | 2 +-
.../Banshee.Amazon/Banshee.Amazon/AmazonTest.cs | 60 +++++++++++++++++++-
2 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/src/Extensions/Banshee.Amazon/Banshee.Amazon.addin.xml b/src/Extensions/Banshee.Amazon/Banshee.Amazon.addin.xml
index 0bd967f..67b5813 100644
--- a/src/Extensions/Banshee.Amazon/Banshee.Amazon.addin.xml
+++ b/src/Extensions/Banshee.Amazon/Banshee.Amazon.addin.xml
@@ -6,7 +6,7 @@
copyright="© 2009 Novell Inc. Licensed under the MIT X11 license."
name="Amazon"
category="User Interface"
- description="Acess Amazon production information, your cart, and wishlists from within Banshee."
+ description="Access Amazon production information, your cart, and wishlists from within Banshee."
author="Gabriel Burt"
url="http://banshee-project.org/"
defaultEnabled="false">
diff --git a/src/Extensions/Banshee.Amazon/Banshee.Amazon/AmazonTest.cs b/src/Extensions/Banshee.Amazon/Banshee.Amazon/AmazonTest.cs
index 4fecdb8..cfe3b50 100644
--- a/src/Extensions/Banshee.Amazon/Banshee.Amazon/AmazonTest.cs
+++ b/src/Extensions/Banshee.Amazon/Banshee.Amazon/AmazonTest.cs
@@ -12,19 +12,77 @@ namespace Banshee.Amazon
private const string ACCESS_KEY = "1WX2TV6EWH519QW2V482";
private const string AFFILIATE_TAG = "banshee";
+ private AmazonECSQuery service;
+
public string ServiceName { get { return "AmazonTest"; } }
public AmazonTest ()
{
+ service = new AmazonECSQuery (ACCESS_KEY, AFFILIATE_TAG);
}
public void Dispose ()
{
}
+ /*public static class SearchIndex
+ {
+ "All"
+ "Books"
+ "Classical"
+ "DigitalMusic" (US only)
+ "Music"
+ "MusicTracks"
+ "DVD"
+ public const string Mp3Downloads = "MP3Downloads";
+ }
+
+ public static class RelationshipType
+ {
+ public const string AuthorityTitle = "";
+ public const string DigitalMusicPerformer = "";
+ public const string DidigtalPrimaryArtist = "";
+ public const string Tracks = "";
+ }
+
+ public void FindItems ()
+ {
+ ItemSearchRequest request = new ItemSearchRequest ();
+ request.SearchIndex = "Music";
+ request.Artist = "Bob Dylan";
+ //request.Conductor
+ //request.Composer
+ //request.WithKeywords
+ request.WithSearchIndex (SearchIn
+
+ try {
+ ItemSearchResponse response = service.ItemSearch (request);
+ Hyena.Log.Information ("Got response to Amazon query", response.ToXML ());
+ } catch (AmazonECSException e) {
+ Hyena.Log.Exception (e);
+ }
+
+ RelationshipTypes = "Tracks",
+ }*/
+
+ public void FindSimilar (string item_id)
+ {
+ var request = new SimilarityLookupRequest ();
+ request.WithResponseGroup ("Large");
+ request.WithItemId (item_id);
+
+ var response = service.SimilarityLookup (request);
+ Console.WriteLine (response.ToXML ());
+ }
+
public void Initialize ()
{
- AmazonECSQuery service = new AmazonECSQuery (ACCESS_KEY, AFFILIATE_TAG);
+ //TestLookup ();
+ FindSimilar ("B0012EJVIA");
+ }
+
+ public void TestLookup ()
+ {
ItemLookupRequest item_lookup = new ItemLookupRequest ();
//item_lookup.WithItemId ("B000RO9PXW"); // cd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]