1

How do I link versions to a playlist, using the python API?

As explained in the title - I can query and create both versions and playlists, but how do I go about adding versions to a playlist?

Thanks.
M

3 comments

  • 0
    Avatar
    Veselin Gyurov

    Bumping this since I have the same problem pls halp :>.

  • 1
    Avatar
    Matt Plummer

    Hey Vesselin, 

    I either worked this out/someone showed me the light - the entity you want to create is a PlaylistVersionConnection.

    data = { 'version': {'type':'Version','id':version_id},
    'playlist' : {'type':'Playlist', 'id': playlist_id}}

    result = sg.create('PlaylistVersionConnection', data)

  • 0
    Avatar
    Veselin Gyurov

    Hi,
    thank you for sharing this info man this is great :>.

Please sign in to leave a comment.