src/lastfmapi/Api/ChartApi.php
public function getTopTags($methodVars)
    {
        $vars = array(
            'method' => 'chart.gettoptags',
            'api_key' => $this->auth->apiKey
        );
        $vars = array_merge($vars, $methodVars);

        if ($call = $this->apiGetCall($vars)) {
            $i = 0;
            foreach ($call->tags->tag as $tags) {
                $topTags[$i]['name'] = (string) $tags->name;
                $topTags[$i]['playcount'] = (string) $tags->playcount;
                $topTags[$i]['listeners'] = (string) $tags->listeners;
                $topTags[$i]['mbid'] = (string) $tags->mbid;
                $topTags[$i]['url'] = (string) $tags->url;
                $topTags[$i]['streamable'] = (string) $tags->streamable;
                $topTags[$i]['image']['small'] = (string) $tags->image[0];
                $topTags[$i]['image']['medium'] = (string) $tags->image[1];
                $topTags[$i]['image']['large'] = (string) $tags->image[2];
                $topTags[$i]['image']['extralarge'] = (string) $tags->image[3];
                $topTags[$i]['image']['mega'] = (string) $tags->image[4];
                $i++;
            }

            return $topTags;
        } else {
            return false;
        }
    }
public function getTopTags($methodVars)
    {
        $vars = array(
            'method' => 'chart.gettoptags',
            'api_key' => $this->auth->apiKey
        );
        $vars = array_merge($vars, $methodVars);

        if ($call = $this->apiGetCall($vars)) {
            $i = 0;
            foreach ($call->tags->tag as $tags) {
                $topTags[$i]['name'] = (string) $tags->name;
                $topTags[$i]['playcount'] = (string) $tags->playcount;
                $topTags[$i]['listeners'] = (string) $tags->listeners;
                $topTags[$i]['mbid'] = (string) $tags->mbid;
                $topTags[$i]['url'] = (string) $tags->url;
                $topTags[$i]['streamable'] = (string) $tags->streamable;
                $topTags[$i]['image']['small'] = (string) $tags->image[0];
                $topTags[$i]['image']['medium'] = (string) $tags->image[1];
                $topTags[$i]['image']['large'] = (string) $tags->image[2];
                $topTags[$i]['image']['extralarge'] = (string) $tags->image[3];
                $topTags[$i]['image']['mega'] = (string) $tags->image[4];
                $i++;
            }

            return $topTags;
        } else {
            return false;
        }
    }
public function getTopTags ( $ methodVars ) { $ vars = array ( 'method' => 'chart.gettoptags' , 'api_key' => $ this -> auth -> apiKey ) ; $ vars = array_merge ( $ vars , $ methodVars ) ; if ( $ call = $ this -> apiGetCall ( $ vars ) ) { $ i = 0 ; foreach ( $ call -> tags -> tag as $ tags ) { $ topTags [ $ i ] [ 'name' ] = ( string ) $ tags -> name ; $ topTags [ $ i ] [ 'playcount' ] = ( string ) $ tags -> playcount ; $ topTags [ $ i ] [ 'listeners' ] = ( string ) $ tags -> listeners ; $ topTags [ $ i ] [ 'mbid' ] = ( string ) $ tags -> mbid ; $ topTags [ $ i ] [ 'url' ] = ( string ) $ tags -> url ; $ topTags [ $ i ] [ 'streamable' ] = ( string ) $ tags -> streamable ; $ topTags [ $ i ] [ 'image' ] [ 'small' ] = ( string ) $ tags -> image [ 0 ] ; $ topTags [ $ i ] [ 'image' ] [ 'medium' ] = ( string ) $ tags -> image [ 1 ] ; $ topTags [ $ i ] [ 'image' ] [ 'large' ] = ( string ) $ tags -> image [ 2 ] ; $ topTags [ $ i ] [ 'image' ] [ 'extralarge' ] = ( string ) $ tags -> image [ 3 ] ; $ topTags [ $ i ] [ 'image' ] [ 'mega' ] = ( string ) $ tags -> image [ 4 ] ; $ i ++ ; } return $ topTags ; } else { return false ; } }
Get the top tags chart
@param array $methodVars An array with the optional value: <i>limit</i>, <i>page</i>
@return array|false
Get the top tags chart