librefm-commits
[Top][All Lists]
Advanced

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

[Librefm-commits] [1886] merge user.getrecenttracks method from trunk


From: Clint Adams
Subject: [Librefm-commits] [1886] merge user.getrecenttracks method from trunk
Date: Fri, 29 May 2009 20:06:49 +0000

Revision: 1886
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1886
Author:   clint
Date:     2009-05-29 20:06:48 +0000 (Fri, 29 May 2009)
Log Message:
-----------
merge user.getrecenttracks method from trunk

Modified Paths:
--------------
    branches/stable/nixtape/2.0/index.php

Modified: branches/stable/nixtape/2.0/index.php
===================================================================
--- branches/stable/nixtape/2.0/index.php       2009-05-29 20:04:22 UTC (rev 
1885)
+++ branches/stable/nixtape/2.0/index.php       2009-05-29 20:06:48 UTC (rev 
1886)
@@ -56,10 +56,10 @@
        LFM_SERVICE_OFFLINE             => 'Service Offline - This service is 
temporarily offline. Try again later.',
        LFM_SUBSCRIPTION_ERROR          => 'Subscription Error - The user needs 
to be subscribed in order to do that',
        LFM_INVALID_SIGNATURE           => 'Invalid method signature supplied',
-       LFM_SUBSCRIPTION_REQD           => 'This user has no free radio plays 
left. Subscription required.'
-       LFM_NOT_ENOUGH_CONTENT          => 'There is not enough content to play 
this station'
-       LFM_NOT_ENOUGH_MEMBERS          => 'This group does not have enough 
members for radio'
-       LFM_NOT_ENOUGH_FANS             => 'This artist does not have enough 
fans for radio'
+       LFM_SUBSCRIPTION_REQD           => 'This user has no free radio plays 
left. Subscription required.',
+       LFM_NOT_ENOUGH_CONTENT          => 'There is not enough content to play 
this station',
+       LFM_NOT_ENOUGH_MEMBERS          => 'This group does not have enough 
members for radio',
+       LFM_NOT_ENOUGH_FANS             => 'This artist does not have enough 
fans for radio',
        LFM_NOT_ENOUGH_NEIGHBORS        => 'Thare are not enough neighbors for 
radio'
 );
 
@@ -72,10 +72,21 @@
        'artist.gettoptracks'           => method_artist_gettoptracks,
        'user.getinfo'                  => method_user_getinfo,
        'user.gettoptracks'             => method_user_gettoptracks,
+       'user.getrecenttracks'          => method_user_getrecenttracks,
        'radio.tune'                    => method_radio_tune,
        'radio.getPlaylist'             => method_radio_getPlaylist,
+
 );
 
+function method_user_getrecenttracks() {
+       if (!isset($_GET['user'])) {
+               report_failure(LFM_INVALID_SIGNATURE);
+       }
+
+       header('Content-Type: text/xml');
+       print(XML::prettyXML(UserXML::getTopTracks($_GET['user'], 
$_GET['limit'])));
+}
+
 function method_user_gettoptracks() {
        if (!isset($_GET['user'])) {
                report_failure(LFM_INVALID_SIGNATURE);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]