TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TppGravityBoxofficeIndexRequest req = new TppGravityBoxofficeIndexRequest();
req.setCityId(-5L);
req.setPageSize(20L);
req.setEndDate("20170704");
req.setDateType(0L);
req.setBeginDate("20170704");
req.setNeedServiceFee(1L);
TppGravityBoxofficeIndexResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TppGravityBoxofficeIndexRequest req = new TppGravityBoxofficeIndexRequest();
req.CityId = -5L;
req.PageSize = 20L;
req.EndDate = "20170704";
req.DateType = 0L;
req.BeginDate = "20170704";
req.NeedServiceFee = 1L;
TppGravityBoxofficeIndexResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TppGravityBoxofficeIndexRequest;
$req->setCityId("-5");
$req->setPageSize("20");
$req->setEndDate("20170704");
$req->setDateType("0");
$req->setBeginDate("20170704");
$req->setNeedServiceFee("1");
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=taobao.tpp.gravity.boxoffice.index' \
-d 'partner_id=apidoc' \
-d 'sign=2EA5CEB564EFA01E0649243675207B1A' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-06-07+07%3A24%3A36' \
-d 'v=2.0' \
-d 'begin_date=20170704' \
-d 'city_id=-5' \
-d 'date_type=0' \
-d 'end_date=20170704' \
-d 'need_service_fee=1' \
-d 'page_size=20'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TppGravityBoxofficeIndexRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.city_id=-5
req.page_size=20
req.end_date="20170704"
req.date_type=0
req.begin_date="20170704"
req.need_service_fee=1
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"taobao.tpp.gravity.boxoffice.index");
add_param(pRequest,"city_id","-5");
add_param(pRequest,"page_size","20");
add_param(pRequest,"end_date","20170704");
add_param(pRequest,"date_type","0");
add_param(pRequest,"begin_date","20170704");
add_param(pRequest,"need_service_fee","1");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('taobao.tpp.gravity.boxoffice.index', {
'city_id':'-5',
'page_size':'20',
'end_date':'20170704',
'date_type':'0',
'begin_date':'20170704',
'need_service_fee':'1'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})