将购买音乐应用到作品中
POST
HFClient client = new DefaultHFClient(url, appkey, secret);
HFOrderPublishRequest request = new HFOrderPublishRequest();
request.setMethod(HFRequest.METHOD_POST);
request.setClientId("hf2y7jk19a56qetq05");
request.setOrderId("1434556569145");
request.setWorkId("uEC00xeWbExGNilHpSN7MoM3AalWqwUp1");
try {
HFOrderPublishResponse response = client.execute(request);
System.out.println(JSON.toJSON(response));
} catch (ApiException e) {
e.printStackTrace();
}
curl - G https: //gateway-open.haifanwu.com -H 'Authorization:HF3-HMAC-SHA1 Signature=D31A386D43892E94D3F4EB6FF07E6CCB' -H 'X-HF-ClientId:hf2y7jk19a56qetq05' -H 'X-HF-AppId:170ae316b9b14c1b9c185988771bde16' -H 'X-HF-Action:OrderPublish' -H 'X-HF-Timestamp:1595831045941' -H 'X-HF-Version:V4.1.1' -H 'X-HF-Nonce:bfHdPwvkMRfbhsWgeXDmaBXhXRTayRig'
-X POST - d 'OrderId=14345678905656911&WorkId=9b14c1b9c1859887'
{
"code": 10200,
"msg": "操作成功",
"data": {
"orderId": "14345678905656911",
"workId": "9b14c1b9c1859887"
},
"taskId": "da9c81a667c84f2c84f86251f9dd1ac1"
}