Get a playlist from it's ID

        :param playlist_id: ID of the playlist
        :rtype: a :class:`Playlist` object
483966
def playlist(self, playlist_id):
        '''
        
        '''
        playlist = self.connection.request(
            'getPlaylistByID',
            {'playlistID': playlist_id},
            self.connection.header('getPlaylistByID'))[1]
        return self._parse_playlist(playlist)
549010
def song_play(self, song):
		

		if 'storeId' in song:
			song_id = song['storeId']
		elif 'trackId' in song:
			song_id = song['trackId']
		else:
			song_id = song['id']

		song_duration = song['durationMillis']

		event = mc_calls.ActivityRecordRealtime.play(song_id, song_duration)
		response = self._call(
			mc_calls.ActivityRecordRealtime,
			event
		)

		return True if response.body['eventResults'][0]['code'] == 'OK' else False
511789
def find_by_reference_ids(reference_ids, connection=None, page_size=100,
        page_number=0, sort_by=DEFAULT_SORT_BY, sort_order=DEFAULT_SORT_ORDER):
        
        reference_ids = ','.join([str(i) for i in reference_ids])
        return pybrightcove.connection.ItemResultSet(
            "find_playlists_by_reference_ids", Playlist, connection, page_size,
            page_number, sort_by, sort_order, reference_ids=reference_ids)
666210
def update_playlist_song(self, playlist_id, song_id, op):
        
        action = 'mtop.alimusic.music.list.collectservice.{}songs'.format(
            'delete' if op == 'del' else 'add')
        payload = {
            'listId': playlist_id,
            'songIds': [song_id]
        }
        code, msg, rv = self.request(action, payload)
        return rv['data']['data']['success'] == 'true'
591842
def get(self, record_id):
        
        record_url = self.record_url(record_id)
        return self._get(record_url)
857531
def download_song_by_id(self, song_id, song_name, folder='.'):
        

        try:
            url = self.crawler.get_song_url(song_id)
            if self.lyric:
                # use old api
                lyric_info = self.crawler.get_song_lyric(song_id)
            else:
                lyric_info = None
            song_name = song_name.replace('/', '')
            song_name = song_name.replace('.', '')
            self.crawler.get_song_by_url(url, song_name, folder, lyric_info)
        except RequestException as exception:
            click.echo(exception)
1192176
function(id) {
      var self = this;

      // Loop through all sounds and find the one with this ID.
      for (var i=0; i<self._sounds.length; i++) {
        if (id === self._sounds[i]._id) {
          return self._sounds[i];
        }
      }

      return null;
    }
232877
def get_hard_track_url(item_id):
    

    streams_url = "https://api.soundcloud.com/i1/tracks/%s/streams/?client_id=%s&app_version=%s" % (
    item_id, AGGRESSIVE_CLIENT_ID, APP_VERSION)
    response = requests.get(streams_url)
    json_response = response.json()

    if response.status_code == 200:
        hard_track_url = json_response['http_mp3_128_url']
        return hard_track_url
    else:
        return None
899101
def get_item(track_url, client_id=CLIENT_ID):
    
    try:
        item_url = url['resolve'].format(track_url)

        r = requests.get(item_url, params={'client_id': client_id})
        logger.debug(r.url)
        if r.status_code == 403:
            return get_item(track_url, ALT_CLIENT_ID)

        item = r.json()
        no_tracks = item['kind'] == 'playlist' and not item['tracks']
        if no_tracks and client_id != ALT_CLIENT_ID:
            return get_item(track_url, ALT_CLIENT_ID)
    except Exception:
        if client_id == ALT_CLIENT_ID:
            logger.error('Failed to get item...')
            return
        logger.error('Error resolving url, retrying...')
        time.sleep(5)
        try:
            return get_item(track_url, ALT_CLIENT_ID)
        except Exception as e:
            logger.error('Could not resolve url {0}'.format(track_url))
            logger.exception(e)
            sys.exit(0)
    return item
999215
function(id) {
      var self = this;

      if (typeof id === 'undefined') {
        var ids = [];
        for (var i=0; i<self._sounds.length; i++) {
          ids.push(self._sounds[i]._id);
        }

        return ids;
      } else {
        return [id];
      }
    }
555965
def find_playlists_by_ids(self, playlist_ids):
        
        url = 'https://openapi.youku.com/v2/playlists/show_batch.json'
        params = {
            'client_id': self.client_id,
            'playlist_ids': playlist_ids
        }
        r = requests.get(url, params=params)
        check_error(r)
        return r.json()
629045
def get(cls, object_id):
        
        from highton.models.party import Party
        return fields.ListField(name=Party.ENDPOINT, init_class=Party).decode(
            cls.element_from_string(
                cls._get_request(endpoint=cls.ENDPOINT + '/' + str(object_id)).text
            )
        )
1215733
def addToPlaylist(playlist,tracks)
      method = 'addToPlaylist'
      type = true
      args = {:playlist=>playlist, :tracks=>Rdio::keys(tracks)}
      return_object type,method,args,true
    end
47028
def play_video(self, video_id, playlist_id=None):
        
        self.start_session_if_none()
        self._session.play_video(video_id, playlist_id)
1034690
def get_playlist_songs(self, playlist_id, limit=1000):
        

        url = 'http://music.163.com/weapi/v3/playlist/detail?csrf_token='
        csrf = ''
        params = {'id': playlist_id, 'offset': 0, 'total': True,
                  'limit': limit, 'n': 1000, 'csrf_token': csrf}
        result = self.post_request(url, params)

        songs = result['playlist']['tracks']
        songs = [Song(song['id'], song['name']) for song in songs]
        return songs
1319543
def get_item_with_id(self, uid):
        
        for item in self.get_items():
            if item.id == uid:
                return item

        return None
660655
public function getPlaylistById(string $id): PlaylistInterface
    {
        $controller = $this->getController();

        return new Playlist($id, $controller);
    }