[banshee] Last.fm: Additional API status codes



commit 84a4b5aca82f22e26d1b86cb2bc845fecc0aca17
Author: Alexander Kojevnikov <alexk gnome org>
Date:   Fri Jun 29 18:17:03 2012 -0400

    Last.fm: Additional API status codes

 src/Libraries/Lastfm/Lastfm/RadioConnection.cs |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/src/Libraries/Lastfm/Lastfm/RadioConnection.cs b/src/Libraries/Lastfm/Lastfm/RadioConnection.cs
index 1fd43fb..63a3d66 100644
--- a/src/Libraries/Lastfm/Lastfm/RadioConnection.cs
+++ b/src/Libraries/Lastfm/Lastfm/RadioConnection.cs
@@ -91,8 +91,12 @@ namespace Lastfm
         NotEnoughMembers,
         NotEnoughFans,
         NotEnoughNeighbours,
-
-        Unknown // not an official code, just the fall back
+        NoPeakRadio,
+        RadioNotFound,
+        ApiKeySuspended,
+        Deprecated,
+        RateLimitExceded = 29,
+        Unknown = -1 // not an official code, just the fall back
     }
 
     public class RadioConnection
@@ -300,6 +304,16 @@ namespace Lastfm
                     return Catalog.GetString ("This artist does not have enough fans for radio.");
                 case StationError.NotEnoughNeighbours:
                     return Catalog.GetString ("There are not enough neighbours for this station.");
+                case StationError.NoPeakRadio:
+                    return Catalog.GetString ("This user is not allowed to listen to radio during peak usage");
+                case StationError.RadioNotFound:
+                    return Catalog.GetString ("Radio station not found");
+                case StationError.ApiKeySuspended:
+                    return Catalog.GetString ("This application is not allowed to make requests to the web services");
+                case StationError.Deprecated:
+                    return Catalog.GetString ("This type of request is no longer supported");
+                case StationError.RateLimitExceded:
+                    return Catalog.GetString ("Your IP has made too many requests in a short period, exceeding our API guidelines");
                 case StationError.Unknown:
                     return Catalog.GetString ("There was an unknown error.");
             }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]