此接口根据用户画像、行为及行业等综合信息像接入平台的用户推荐音乐内容。接口推荐准确度与获取Token、行为采集深度相关,如果确实相关信息推荐的准确度会大受影响
GET
HFClient client = new DefaultHFClient(url, appkey, secret);
HFBaseFavoriteRequest request = new HFBaseFavoriteRequest();
request.setMethod(HFRequest.METHOD_GET);
request.setPage(1);
request.setPageSize(20);
request.setClientId("hf2y7jk19a56qetq05");
request.setToken("13cda3f10b63120093d64ebf4116eabd");
try {
HFBaseFavoriteResponse 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=12436239C9223CB9B91A1B4B0CF23E40' -H 'X-HF-ClientId:hf2y7jk19a56qetq05' -H 'X-HF-Token:cc24749900a70c83222654b48cc57a2a' -H 'X-HF-AppId:170ae316b9b14c1b9c185988771bde16' -H 'X-HF-Action:BaseFavorite' -H 'X-HF-Timestamp:1595820745533' -H 'X-HF-Version:V4.1.1' -H 'X-HF-Nonce:PuskjhBdBgGxHDWWHWIIxJGWLWTxaXWu'
-X GET -d 'Page=1&PageSize=20'
{
"code": 10200,
"msg": "操作成功",
"data": {
"record": [{
"musicId": "4B40E8CBD",
"musicName": "风吹玉米田",
"albumId": "242016",
"albumName": "EVA 芬克家族",
"artist": [{
"name": "杰西",
"code": "1D652A73C86",
"avatar": "https://static-hifiveai-open.haifanwu.com/artist/default.png?sign=f05f48161002024e745df097785fe2c4&t=1595818302"
}],
"author": [],
"composer": [{
"name": "杰西",
"code": "1D652A73C86",
"avatar": "https://static-hifiveai-open.haifanwu.com/artist/default.png?sign=f05f48161002024e745df097785fe2c4&t=1595818302"
}],
"arranger": [],
"duration": 0,
"bpm": 0,
"tag": [{
"tagId": 5439,
"tagName": "流行 Pop",
"child": []
}, {
"tagId": 5440,
"tagName": "-",
"child": []
}],
"version": [{
"name": "主版本",
"musicId": "4B40E8CBD",
"free": 0,
"price": 48000,
"majorVersion": true,
"duration": 0,
"auditionBegin": 0,
"auditionEnd": 0
}],
"match": 49.0,
"auditionBegin": 0,
"auditionEnd": 0,
"cover": [{
"url": "https://static-hifiveai-open.haifanwu.com/artwork/COPYRIGHT/4B40E8C95/4B40E8C95.jpg",
"size": ""
}]
}],
"meta": {
"totalCount": 1,
"currentPage": 1
}
},
"taskId": "ce1d9a1a45fa4a84b72e83639e488ff7"
}