@property
    def link(self):
        if not self.is_loaded:
            raise spotify.Error('The playlist must be loaded to create a link')
        sp_link = lib.sp_link_create_from_playlist(self._sp_playlist)
        if sp_link == ffi.NULL:
            if not self.is_in_ram:
                raise spotify.Error(
                    'The playlist must have been in RAM to create a link')
            # XXX Figure out why we can still get NULL here even if
            # the playlist is both loaded and in RAM.
            raise spotify.Error('Failed to get link from Spotify playlist')
        return spotify.Link(self._session, sp_link=sp_link, add_ref=False)
A :class:`Link` to the playlist.
dataset/ETHPy150Open mopidy/pyspotify/spotify/playlist.py/Playlist.link