fn create_playlist(client: &Client, name: String, songs: &[u64]) -> Result<Option<Playlist>> {
    let args = Query::new()
        .arg("name", name)
        .arg_list("songId", songs)
        .build();

    let res = client.get("createPlaylist", args)?;

    // TODO API is private
    // if client.api >= "1.14.0".into() {
    Ok(Some(serde_json::from_value(res)?))
    // } else {
    // Ok(None)
    // }
}
/// Creates a playlist with the given name.
///
/// Since API version 1.14.0, the newly created playlist is returned. In earlier
/// versions, an empty response is returned.
Creates a playlist with the given name.
Since API version 1.14.0, the newly created playlist is returned. In earlier
versions, an empty response is returned.
Creates a playlist with the given name . Since API version 1 . 14 . 0 the newly created playlist is returned . In earlier versions an empty response is returned .
fn create_playlist(client: &Client, name: String, songs: &[u64]) -> Result<Option<Playlist>> {
    let args = Query::new()
        .arg("name", name)
        .arg_list("songId", songs)
        .build();
    let res = client.get("createPlaylist", args)?;
    // TODO API is private
    // if client.api >= "1.14.0".into() {
    Ok(Some(serde_json::from_value(res)?))
    // } else {
    // Ok(None)
    // }
}
fn create_playlist ( client : & Client , name : String , songs : & [ u64 ] ) -> Result < Option < Playlist > > { let args = Query :: new ( ) . arg ( " " , name ) . arg_list ( " " , songs ) . build ( ) ; let res = client . get ( " " , args ) ? ; // TODO API is private // if client.api >= "1.14.0".into() { Ok ( Some ( serde_json :: from_value ( res ) ? ) ) // } else { // Ok(None) // } }
Creates a playlist with the given name.
Creates a playlist with the given name .
client
&Client
name
String
songs
&[u64]
client
&Client
name
String
songs
&[u64]