多维度查询歌曲列表
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
search_terms | SearchTermsDto [] | 可选 |
|
搜索条件 key支持songName/singerName/copyrightStatus/publishStatus/keyword | |
|
|||||
tag_optional | SongCatsSearchDto | 可选 | tag搜索条件,tag尽量不要超过50个 | ||
|
|||||
order_by | Number | 可选 | 1 | 排序,默认按照最新排序 1最新 2本周最热 3本月最热 | |
page | PagingVo | 必须 | 分页信息 | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
songs | Page | songs | 返回的歌曲信息 |
|
|||
result_code | ResultCode | ResultCode | 系统自动生成 |
|
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); XiamiContentSongsInfoQueryRequest req = new XiamiContentSongsInfoQueryRequest(); List<XiamiContentSongsInfoQueryRequest.SearchTermsDto> list2 = new ArrayList<XiamiContentSongsInfoQueryRequest.SearchTermsDto>(); XiamiContentSongsInfoQueryRequest.SearchTermsDto obj3 = new XiamiContentSongsInfoQueryRequest.SearchTermsDto(); list2.add(obj3); obj3.setValue("小幸运"); obj3.setKey("songName"); req.setSearchTerms(list2); XiamiContentSongsInfoQueryRequest.SongCatsSearchDto obj4 = new XiamiContentSongsInfoQueryRequest.SongCatsSearchDto(); obj4.setRelation(1L); List<XiamiContentSongsInfoQueryRequest.SongCatTagDto> list6 = new ArrayList<XiamiContentSongsInfoQueryRequest.SongCatTagDto>(); XiamiContentSongsInfoQueryRequest.SongCatTagDto obj7 = new XiamiContentSongsInfoQueryRequest.SongCatTagDto(); list6.add(obj7); obj7.setRelation(1L); obj7.setTagCodes("tagCodes"); obj4.setCatTagCodes(list6); req.setTagOptional(obj4); req.setOrderBy(1L); XiamiContentSongsInfoQueryRequest.PagingVo obj8 = new XiamiContentSongsInfoQueryRequest.PagingVo(); obj8.setPageSize(20L); obj8.setPage(1L); req.setPage(obj8); XiamiContentSongsInfoQueryResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody());
<xiami_content_songs_info_query_response> <songs> <song_list> <song_info_dto> <singers> <artist_dto> <area>China 中国大陆</area> <gender>M</gender> <alias>左小祖咒</alias> <artist_name>左小祖咒</artist_name> <artist_logo>http://pic.xiami.net/images/artistlogo/67/15483850525367.jpg</artist_logo> <artist_id>1290</artist_id> </artist_dto> </singers> <song_name>叔叔喜欢下象棋</song_name> <composers> <artist_dto> <area>China 中国大陆</area> <gender>M</gender> <alias>左小祖咒</alias> <artist_name>左小祖咒</artist_name> <artist_logo>http://pic.xiami.net/images/artistlogo/67/15483850525367.jpg</artist_logo> <artist_id>1290</artist_id> </artist_dto> </composers> <artists> <artist_dto> <area>China 中国大陆</area> <gender>M</gender> <alias>左小祖咒</alias> <artist_name>左小祖咒</artist_name> <artist_logo>http://pic.xiami.net/images/artistlogo/67/15483850525367.jpg</artist_logo> <artist_id>1290</artist_id> </artist_dto> </artists> <album> <album_logo>http://pic.xiami.net/images/album/img90/1290/7769913111376991311.jpg</album_logo> <album_name>一座城池 电影原声带</album_name> <sub_name>一座城池</sub_name> <album_status>1</album_status> <gmt_publish>1376582400000</gmt_publish> <album_id>776991311</album_id> <language>纯音乐</language> </album> <songwriters> <artist_dto> <area>China 中国大陆</area> <gender>M</gender> <alias>左小祖咒</alias> <artist_name>左小祖咒</artist_name> <artist_logo>http://pic.xiami.net/images/artistlogo/67/15483850525367.jpg</artist_logo> <artist_id>1290</artist_id> </artist_dto> </songwriters> <producers> <artist_dto> <area>China 中国大陆</area> <gender>M</gender> <alias>左小祖咒</alias> <artist_name>左小祖咒</artist_name> <artist_logo>http://pic.xiami.net/images/artistlogo/67/15483850525367.jpg</artist_logo> <artist_id>1290</artist_id> </artist_dto> </producers> <tags> <tag_link> <parent> <parent> <code>cat_2_563_4_163873331</code> <name_cn>流派</name_cn> <description>描述</description> <pid>0</pid> <id>1</id> <name_en>style</name_en> </parent> <code>cat_2_563_4_163873331</code> <name_cn>流行</name_cn> <description>描述</description> <pid>1232</pid> <id>1</id> <name_en>popular</name_en> </parent> <code>cat_2_563_4_163873331</code> <name_cn>电子流行</name_cn> <description>描述</description> <pid>1232</pid> <id>1</id> <name_en>electropop</name_en> </tag_link> </tags> <copyright_status>0</copyright_status> <arrangements> <artist_dto> <area>China 中国大陆</area> <gender>M</gender> <alias>左小祖咒</alias> <artist_name>左小祖咒</artist_name> <artist_logo>http://pic.xiami.net/images/artistlogo/67/15483850525367.jpg</artist_logo> <artist_id>1290</artist_id> </artist_dto> </arrangements> <lyrics> <lyric_dto> <lyric_type>LRC</lyric_type> <lyric_id>251062117</lyric_id> <lyric_url>http://img.xiami.net/lyric/36/2103473336_1595920458404_5723.LRC</lyric_url> </lyric_dto> </lyrics> <song_sub_name>歌曲副标题</song_sub_name> <song_id>1772118366</song_id> <publish_status>1</publish_status> <duration>120000</duration> <waveform_url>http://img.xiami.net//wave/2104408824_1615443436340.txt</waveform_url> </song_info_dto> </song_list> <paging> <pages>1</pages> <count>2</count> <page_size>10</page_size> <page>1</page> </paging> </songs> <result_code> <msg>success</msg> <code>0</code> </result_code> </xiami_content_songs_info_query_response>
<error_response> <code>50</code> <msg>Remote service error</msg> <sub_code>isv.invalid-parameter</sub_code> <sub_msg>非法参数</sub_msg> </error_response>
错误码 | 错误描述 | 解决方案 |
---|