spotify/models/player.py
async def play(self, *uris: SomeURIs, offset: Optional[Offset] = 0, device: Optional[SomeDevice] = None):
        """Start a new context or resume current playback on the user’s active device.

        The method treats a single argument as a Spotify context, such as a Artist, Album and playlist objects/URI.
        When called with multiple positional arguments they are interpreted as a array of Spotify Track objects/URIs.

        Parameters
        ----------
        *uris : :obj:`SomeURIs`
            When a single argument is passed in that argument is treated as a context.
            Valid contexts are: albums, artists, playlists.
            Album, Artist and Playlist objects are accepted too.
            Otherwise when multiple arguments are passed in they,
            A sequence of Spotify Tracks or Track URIs to play.
        offset : Optional[:obj:`Offset`]
            Indicates from where in the context playback should start.
            Only available when `context` corresponds to an album or playlist object, 
            or when the `uris` parameter is used. when an integer offset is zero based and can’t be negative. 
        device : Optional[:obj:`SomeDevice`]
            The Device object or id of the device this command is targeting.
            If not supplied, the user’s currently active device is the target.
        """
        if len(uris) > 1:
            # Regular uris paramter
            context_uri = list(str(uri) for uri in uris)
        else:
            # Treat it as a context URI
            context_uri = str(uris[0])

        if device is not None:
            if not isinstance(device, (Device, str)):
                raise TypeError('Expected `device` to either be a spotify.Device or a string. got {type(0)!r}'.format(device))
            else:
                device = device.id

        await self._user.http.play_playback(context_uri, offset=offset, device_id=device)
async def play(self, *uris: SomeURIs, offset: Optional[Offset] = 0, device: Optional[SomeDevice] = None):
        """Start a new context or resume current playback on the user’s active device.

        The method treats a single argument as a Spotify context, such as a Artist, Album and playlist objects/URI.
        When called with multiple positional arguments they are interpreted as a array of Spotify Track objects/URIs.

        Parameters
        ----------
        *uris : :obj:`SomeURIs`
            When a single argument is passed in that argument is treated as a context.
            Valid contexts are: albums, artists, playlists.
            Album, Artist and Playlist objects are accepted too.
            Otherwise when multiple arguments are passed in they,
            A sequence of Spotify Tracks or Track URIs to play.
        offset : Optional[:obj:`Offset`]
            Indicates from where in the context playback should start.
            Only available when `context` corresponds to an album or playlist object, 
            or when the `uris` parameter is used. when an integer offset is zero based and can’t be negative. 
        device : Optional[:obj:`SomeDevice`]
            The Device object or id of the device this command is targeting.
            If not supplied, the user’s currently active device is the target.
        """
        if len(uris) > 1:
            # Regular uris paramter
            context_uri = list(str(uri) for uri in uris)
        else:
            # Treat it as a context URI
            context_uri = str(uris[0])

        if device is not None:
            if not isinstance(device, (Device, str)):
                raise TypeError('Expected `device` to either be a spotify.Device or a string. got {type(0)!r}'.format(device))
            else:
                device = device.id

        await self._user.http.play_playback(context_uri, offset=offset, device_id=device)
async def play ( self , * uris : SomeURIs , offset : Optional [ Offset ] = 0 , device : Optional [ SomeDevice ] = None ) : if len ( uris ) > 1 : # Regular uris paramter context_uri = list ( str ( uri ) for uri in uris ) else : # Treat it as a context URI context_uri = str ( uris [ 0 ] ) if device is not None : if not isinstance ( device , ( Device , str ) ) : raise TypeError ( 'Expected `device` to either be a spotify.Device or a string. got {type(0)!r}' . format ( device ) ) else : device = device . id await self . _user . http . play_playback ( context_uri , offset = offset , device_id = device )
Start a new context or resume current playback on the user’s active device.

        The method treats a single argument as a Spotify context, such as a Artist, Album and playlist objects/URI.
        When called with multiple positional arguments they are interpreted as a array of Spotify Track objects/URIs.

        Parameters
        ----------
        *uris : :obj:`SomeURIs`
            When a single argument is passed in that argument is treated as a context.
            Valid contexts are: albums, artists, playlists.
            Album, Artist and Playlist objects are accepted too.
            Otherwise when multiple arguments are passed in they,
            A sequence of Spotify Tracks or Track URIs to play.
        offset : Optional[:obj:`Offset`]
            Indicates from where in the context playback should start.
            Only available when `context` corresponds to an album or playlist object, 
            or when the `uris` parameter is used. when an integer offset is zero based and can’t be negative. 
        device : Optional[:obj:`SomeDevice`]
            The Device object or id of the device this command is targeting.
            If not supplied, the user’s currently active device is the target.
Start a new context or resume current playback on the user’s active device .