Polyv Help Center

Help Center

Update Playlist Information

Updated: 2022-05-23 19:02:59

Interface URL

https://api.polyv.net/v2/play-list/update

Interface Description

Update playlist information

Supported Format

JSON

Request Method

POST

Request Parameters

Parameter Required Type and Range Description
userid Yes string User ID
ptime Yes long Current time in milliseconds (13 digits), valid for 3 minutes
sign Yes String Signature, a 40-character uppercase SHA1 value [See Signature Generation Rules]
playListId Yes long Playlist ID
title Yes string Title
description No string Description
tag No string Tag

JSON Example of Successful Response

{
    "code": 200,
    "status": "success",
    "message": "success",
    "data": {
        "playListId": 1620220689111
    }
}

JSON Example of Error Response

签名不正确
{
"code":400,
"status":"error",
"message":"the sign is not right",
"data":""
}
时间戳过期
{
"code":400,
"status":"error",
"message":"ptime is too old.",
"data":""
}

Field Description

Field Type Description
code int Return code
status string Return status
message string Return message
data object Operation result
playListId string Playlist ID

Java Request Example:

    public void testUpdatePlayList() throws Exception {
        String url = "https://api.polyv.net/v2/play-list/update";
        Map<String, String> params = new HashMap<>();
        params.put("userid", userid);
        params.put("title", "标题");
        params.put("description", "描述");
        params.put("tag", "标签");
        params.put("ptime", String.valueOf(System.currentTimeMillis()));
        params.put("sign", getSign(params, secretkey));
        String response = HttpClientUtil.getInstance().sendHttpPost(url, params);
        System.out.println(response);
    }
联系客服,在线咨询