src/lastfmapi/Api/UserApi.php
public function getWeeklyChartList($methodVars)
    {
        // Check for required variables
        if (!empty($methodVars['user'])) {
            $vars = array(
                'method' => 'user.getweeklychartlist',
                'api_key' => $this->auth->apiKey
            );
            $vars = array_merge($vars, $methodVars);

            if ($call = $this->apiGetCall($vars)) {
                $i = 0;
                foreach ($call->weeklychartlist->chart as $chart) {
                    $weeklychartlist[$i]['from'] = (string) $chart['from'];
                    $weeklychartlist[$i]['to'] = (string) $chart['to'];
                    $i++;
                }

                return $weeklychartlist;
            } else {
                return false;
            }
        } else {
            throw new InvalidArgumentException('You must include artist variable in the call for this method');
        }
    }
public function getWeeklyChartList($methodVars)
    {
        // Check for required variables
        if (!empty($methodVars['user'])) {
            $vars = array(
                'method' => 'user.getweeklychartlist',
                'api_key' => $this->auth->apiKey
            );
            $vars = array_merge($vars, $methodVars);

            if ($call = $this->apiGetCall($vars)) {
                $i = 0;
                foreach ($call->weeklychartlist->chart as $chart) {
                    $weeklychartlist[$i]['from'] = (string) $chart['from'];
                    $weeklychartlist[$i]['to'] = (string) $chart['to'];
                    $i++;
                }

                return $weeklychartlist;
            } else {
                return false;
            }
        } else {
            throw new InvalidArgumentException('You must include artist variable in the call for this method');
        }
    }
public function getWeeklyChartList ( $ methodVars ) { // Check for required variables
 if ( ! empty ( $ methodVars [ 'user' ] ) ) { $ vars = array ( 'method' => 'user.getweeklychartlist' , 'api_key' => $ this -> auth -> apiKey ) ; $ vars = array_merge ( $ vars , $ methodVars ) ; if ( $ call = $ this -> apiGetCall ( $ vars ) ) { $ i = 0 ; foreach ( $ call -> weeklychartlist -> chart as $ chart ) { $ weeklychartlist [ $ i ] [ 'from' ] = ( string ) $ chart [ 'from' ] ; $ weeklychartlist [ $ i ] [ 'to' ] = ( string ) $ chart [ 'to' ] ; $ i ++ ; } return $ weeklychartlist ; } else { return false ; } } else { throw new InvalidArgumentException ( 'You must include artist variable in the call for this method' ) ; } }
Get a list of available charts for this user, expressed as date ranges which can be sent to the chart services
@param array $methodVars An array with the following required values: <i>user</i>
@return array
Get a list of available charts for this user expressed as date ranges which can be sent to the chart services