Returns a list of the most played Tracks by this artist.
185529
def get_top_tracks(self, limit=None, cacheable=True):
        """"""
        params = self._get_params()
        if limit:
            params["limit"] = limit

        return self._get_things("getTopTracks", "track", Track, params, cacheable)
1253348
def export(self):
        
        return {'artists': self._artists,
                'radio': self._radio,
                'recent_artists': self._recent_artists,
                'songs_already_seen': self._songs_already_seen}
1100886
def get_tracks(self, *args, **kwargs):
        
        args = tuple(['tracks'] + list(args))
        return self.get_music_library_information(*args, **kwargs)
519595
public Observable<ArrayList<SoundCloudTrack>> getArtistTracks() {
        checkState();
        if (mCacheRam.tracks.size() != 0) {
            return Observable.create(new Observable.OnSubscribe<ArrayList<SoundCloudTrack>>() {
                @Override
                public void call(Subscriber<? super ArrayList<SoundCloudTrack>> subscriber) {
                    subscriber.onNext(mCacheRam.tracks);
                    subscriber.onCompleted();
                }
            });
        } else {
            return mRetrofitService.getUserTracks(mArtistName)
                    .map(RxParser.PARSE_USER_TRACKS)
                    .map(cacheTracks());
        }
    }
273852
function SpotifySearch (title) {
  /**
   * @public {Array} tracks.
   */
  this.tracks = []

  // Query spotify, parse xml response, display in terminal,
  // prompt user for track number, play track.
  this._query(title)
  .then(this._parseJSON.bind(this))
  .then(this._printData.bind(this))
  .then(this._promptUser.bind(this))
  .then(this._playTrack.bind(this))
  .fail(this._onError.bind(this))
}
111856
def songs(self):
        
        if self._songs is None:
            self._songs = [Song.from_response(song, self._connection) for song in
                           self._connection.request(
                               'artistGetArtistSongs',
                               {'artistID': self.id},
                               self._connection.header('artistGetArtistSongs'))[1]]
        return iter(self._songs)
1240896
def play_Tracks(self, tracks, channels, bpm=120):
        
        self.notify_listeners(self.MSG_PLAY_TRACKS, {'tracks': tracks,
            'channels': channels, 'bpm': bpm})

        # Set the right instruments
        for x in range(len(tracks)):
            instr = tracks[x].instrument
            if isinstance(instr, MidiInstrument):
                try:
                    i = instr.names.index(instr.name)
                except:
                    i = 1
                self.set_instrument(channels[x], i)
            else:
                self.set_instrument(channels[x], 1)
        current_bar = 0
        max_bar = len(tracks[0])

        # Play the bars
        while current_bar < max_bar:
            playbars = []
            for tr in tracks:
                playbars.append(tr[current_bar])
            res = self.play_Bars(playbars, channels, bpm)
            if res != {}:
                bpm = res['bpm']
            else:
                return {}
            current_bar += 1
        return {'bpm': bpm}
784951
async def get_tracks(self, query) -> Tuple[Track, ...]:
        
        if not self._warned:
            log.warn("get_tracks() is now deprecated. Please switch to using load_tracks().")
            self._warned = True
        result = await self.load_tracks(query)
        return result.tracks
1181518
public function getTopTracks($methodVars)
    {
        // Check for required variables
        if (!empty($methodVars['user'])) {
            $vars = array(
                'method' => 'user.gettoptracks',
                'api_key' => $this->auth->apiKey
            );
            $vars = array_merge($vars, $methodVars);

            if ($call = $this->apiGetCall($vars)) {
                if (count($call->toptracks->track) > 0) {
                    $i = 0;
                    foreach ($call->toptracks->track as $track) {
                        $toptracks[$i]['name'] = (string) $track->name;
                        $toptracks[$i]['rank'] = (string) $track['rank'];
                        $toptracks[$i]['playcount'] = (string) $track->playcount;
                        $toptracks[$i]['mbid'] = (string) $track->mbid;
                        $toptracks[$i]['url'] = (string) $track->url;
                        $toptracks[$i]['streamable'] = (string) $track->streamable;
                        $toptracks[$i]['fulltrack'] = (string) $track->streamable['fulltrack'];
                        $toptracks[$i]['artist']['name'] = (string) $track->artist->name;
                        $toptracks[$i]['artist']['mbid'] = (string) $track->artist->mbid;
                        $toptracks[$i]['artist']['url'] = (string) $track->artist->url;
                        $toptracks[$i]['images']['small'] = (string) $track->image[0];
                        $toptracks[$i]['images']['medium'] = (string) $track->image[1];
                        $toptracks[$i]['images']['large'] = (string) $track->image[2];
                        $i++;
                    }

                    return $toptracks;
                } else {
                    throw new NoResultsException('This user has no top tracks');
                }
            } else {
                return false;
            }
        } else {
            throw new InvalidArgumentException('You must include artist variable in the call for this method');
        }
    }
414662
def get_playlists(self, search, start=0, max_items=100):
        
        return self.get_music_service_information('playlists', search, start,
                                                  max_items)
1038624
def find_closest_match(target_track, tracks):
    
    track = None
    # Get a list of (track, artist match ratio, name match ratio)
    tracks_with_match_ratio = [(
        track,
        get_similarity(target_track.artist, track.artist),
        get_similarity(target_track.name, track.name),
    ) for track in tracks]
    # Sort by artist then by title
    sorted_tracks = sorted(
        tracks_with_match_ratio,
        key=lambda t: (t[1], t[2]),
        reverse=True  # Descending, highest match ratio first
    )
    if sorted_tracks:
        track = sorted_tracks[0][0]  # Closest match to query
    return track
408018
public List<String> getPlayerNames() {
        return lastGameState.getPlayers().stream().map(Player::getUsername).collect(Collectors.toList());
    }
370169
def get_tracks(self):
        """"""

        return _extract_tracks(
            self._request(self.ws_prefix + ".getInfo", cacheable=True), self.network
        )
131899
def collection(self, user_id):
        
        # TODO further evaluation of the page param, I don't know where the
        # limit is.
        dct = {'userID': user_id, 'page': 0}
        r = 'userGetSongsInLibrary'
        result = self.connection.request(r, dct, self.connection.header(r))
        songs = result[1]['Songs']
        return [Song.from_response(song, self.connection) for song in songs]
981976
def getTracksForArtist(artist,appears_on=nil,start=nil,count=nil,extras=nil)
      method = 'getTracksForArtist'
      type = Track
      args = {:artist=>artist}
      args[:appears_on] = appears_on if appears_on
      args[:start] = start if start
      args[:count] = count if count
      args[:extras] = extras if extras
      return_object type,method,args
    end
740000
def listtracks(continuation_token: nil)
      oauth2_refresh_access_token if oauth2_access_token_expired?

      pb_body = MusicManager::ExportTracksRequest.new
      pb_body.client_id = uploader_id
      pb_body.export_type = MusicManager::ExportTracksRequest::TrackType::ALL
      pb_body.continuation_token = continuation_token unless continuation_token.nil?

      uri = URI('https://music.google.com/music/exportids')

      http = Net::HTTP.new(uri.host, uri.port)
      http.use_ssl = true

      req = Net::HTTP::Post.new(uri.path)
      req.body = pb_body.serialize_to_string
      req['Content-Type'] = 'application/x-google-protobuf'
      req['Authorization'] = oauth2_authentication_header
      req['X-Device-ID'] = uploader_id
      res = http.request(req)

      unless res.is_a? Net::HTTPSuccess
        fail Error, 'listtracks failed: #{res.code}'
      end

      MusicManager::ExportTracksResponse.new.parse_from_string(res.body)
    end
21403
def get_artists(self, limit=50, cacheable=True):
        

        seq = []
        for node in _collect_nodes(
            limit, self, self.ws_prefix + ".getArtists", cacheable
        ):
            name = _extract(node, "name")

            playcount = _number(_extract(node, "playcount"))
            tagcount = _number(_extract(node, "tagcount"))

            seq.append(LibraryItem(Artist(name, self.network), playcount, tagcount))

        return seq