def play_playlist(self, playlist_id, shuffle=False, repeat=False): response = control.client.post( control._url(f'/groups/{self.group_id}/playlists'), json={ "playlistId": int(playlist_id), "playOnCompletion": True, "playModes": { "shuffle": shuffle, "repeat": repeat, }, }, ) result = control._json(response) return result
def playlists(self): household_id = active_household_store.get_active_household() response = control.client.get(control._url(f'/households/{household_id}/playlists')) result = control._json(response) return result['playlists']
def playlist(self, playlist_id): household_id = active_household_store.get_active_household() response = control.client.post(control._url(f'/households/{household_id}/playlists/getPlaylist'), json={"playlistId": int(playlist_id)}) result = control._json(response) return result
def favorites(self): household_id = active_household_store.get_active_household() response = control.client.get(control._url(f'/households/{household_id}/favorites')) result = control._json(response) return result['items']