TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlisportsGymnasiumGymJointCardPushjointcardRequest req = new AlibabaAlisportsGymnasiumGymJointCardPushjointcardRequest();
AlibabaAlisportsGymnasiumGymJointCardPushjointcardRequest.GymJointCardReqDto obj1 = new AlibabaAlisportsGymnasiumGymJointCardPushjointcardRequest.GymJointCardReqDto();
obj1.setAgreementContent("[\"协议1\",\"协议2\"]");
obj1.setAgreementName("{\"协议1\":\"协议1内容\",\"协议2\":\"协议2内容\"}");
obj1.setCardId("1");
obj1.setCardName("一卡通");
obj1.setCardStatus(1L);
obj1.setCardType(1L);
obj1.setDescription("购买须知");
obj1.setDiscountInfo("享95折,满10减5");
obj1.setDonation(1L);
obj1.setMinRechargeAmount(1L);
obj1.setCenterId("1");
obj1.setCenterName("测试中心");
obj1.setPrice(100L);
obj1.setSportsItemKey("swim");
obj1.setSportsItemName("游泳");
obj1.setThirdStadiumId("1,2,3");
obj1.setThirdStadiumName("测试场馆1,测试场馆2,测试场馆3");
req.setParamGymJointCardReqDTO(obj1);
AlibabaAlisportsGymnasiumGymJointCardPushjointcardResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaAlisportsGymnasiumGymJointCardPushjointcardRequest req = new AlibabaAlisportsGymnasiumGymJointCardPushjointcardRequest();
AlibabaAlisportsGymnasiumGymJointCardPushjointcardRequest.GymJointCardReqDtoDomain obj1 = new AlibabaAlisportsGymnasiumGymJointCardPushjointcardRequest.GymJointCardReqDtoDomain();
obj1.AgreementContent = "[\"协议1\",\"协议2\"]";
obj1.AgreementName = "{\"协议1\":\"协议1内容\",\"协议2\":\"协议2内容\"}";
obj1.CardId = "1";
obj1.CardName = "一卡通";
obj1.CardStatus = 1L;
obj1.CardType = 1L;
obj1.Description = "购买须知";
obj1.DiscountInfo = "享95折,满10减5";
obj1.Donation = 1L;
obj1.MinRechargeAmount = 1L;
obj1.CenterId = "1";
obj1.CenterName = "测试中心";
obj1.Price = 100L;
obj1.SportsItemKey = "swim";
obj1.SportsItemName = "游泳";
obj1.ThirdStadiumId = "1,2,3";
obj1.ThirdStadiumName = "测试场馆1,测试场馆2,测试场馆3";
req.ParamGymJointCardReqDTO_ = obj1;
AlibabaAlisportsGymnasiumGymJointCardPushjointcardResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaAlisportsGymnasiumGymJointCardPushjointcardRequest;
$param_gym_joint_card_req_d_t_o = new GymJointCardReqDto;
$param_gym_joint_card_req_d_t_o->agreement_content="[\"协议1\",\"协议2\"]";
$param_gym_joint_card_req_d_t_o->agreement_name="{\"协议1\":\"协议1内容\",\"协议2\":\"协议2内容\"}";
$param_gym_joint_card_req_d_t_o->card_id="1";
$param_gym_joint_card_req_d_t_o->card_name="一卡通";
$param_gym_joint_card_req_d_t_o->card_status="1";
$param_gym_joint_card_req_d_t_o->card_type="1";
$param_gym_joint_card_req_d_t_o->description="购买须知";
$param_gym_joint_card_req_d_t_o->discount_info="享95折,满10减5";
$param_gym_joint_card_req_d_t_o->donation="1";
$param_gym_joint_card_req_d_t_o->min_recharge_amount="1";
$param_gym_joint_card_req_d_t_o->center_id="1";
$param_gym_joint_card_req_d_t_o->center_name="测试中心";
$param_gym_joint_card_req_d_t_o->price="100";
$param_gym_joint_card_req_d_t_o->sports_item_key="swim";
$param_gym_joint_card_req_d_t_o->sports_item_name="游泳";
$param_gym_joint_card_req_d_t_o->third_stadium_id="1,2,3";
$param_gym_joint_card_req_d_t_o->third_stadium_name="测试场馆1,测试场馆2,测试场馆3";
$req->setParamGymJointCardReqDTO(json_encode($param_gym_joint_card_req_d_t_o));
$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=alibaba.alisports.gymnasium.gym.joint.card.pushjointcard' \
-d 'partner_id=apidoc' \
-d 'sign=338AD520591CD79C1B292F2781C305D5' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-23+22%3A36%3A54' \
-d 'v=2.0' \
-d 'param_gym_joint_card_req_d_t_o=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaAlisportsGymnasiumGymJointCardPushjointcardRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_gym_joint_card_req_d_t_o=""
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,"alibaba.alisports.gymnasium.gym.joint.card.pushjointcard");
add_param(pRequest,"param_gym_joint_card_req_d_t_o","数据结构JSON示例");
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('alibaba.alisports.gymnasium.gym.joint.card.pushjointcard', {
'param_gym_joint_card_req_d_t_o':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})