测试代码片

测试一下代码片,英文状态下输入三个‘`’,即可实现代码功能。

# -*- coding: utf-8 -*-

import top.api

req=top.api.AlibabaMusicSearchSongsGetRequest(url,port)

req.set_app_info(top.appinfo(appkey,secret))

req.limit=10

req.page="1"

req.key="刘德华"

try:

resp=req.getResponse()

print(resp)

except Exception as e:

print(e)



JAVA 请求示例:

TaobaoClient client =newDefaultTaobaoClient(url, appkey, secret);

AlibabaMusicSearchSongsGetRequest req =newAlibabaMusicSearchSongsGetRequest();

req.setLimit(10L);

req.setPage("1");

req.setKey("刘德华");

AlibabaMusicSearchSongsGetResponse rsp = client.execute(req);

System.out.println(rsp.getBody());

你可能感兴趣的:(测试代码片)