TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
SmartpicPictagSchedulepicSaveRequest req = new SmartpicPictagSchedulepicSaveRequest();
SmartpicPictagSchedulepicSaveRequest.SaveUnitRequest obj1 = new SmartpicPictagSchedulepicSaveRequest.SaveUnitRequest();
SmartpicPictagSchedulepicSaveRequest.DeliverySetting obj2 = new SmartpicPictagSchedulepicSaveRequest.DeliverySetting();
obj2.setStartTime(1676898078000L);
obj2.setEndTime(1676898078000L);
obj1.setDeliverySetting(obj2);
obj1.setItemId(123L);
SmartpicPictagSchedulepicSaveRequest.SrcPicSetting obj3 = new SmartpicPictagSchedulepicSaveRequest.SrcPicSetting();
obj3.setUseItemNormalSrcPic(false);
obj3.setSize("1:1");
obj3.setSpecialSrcPic("https://gw.alicdn.com/imgextra/O1CN012JsWJzDjNUnyxS9_!!263669477-0-picasso.jpg");
obj1.setSrcPicSetting(obj3);
obj1.setJuId(1234L);
SmartpicPictagSchedulepicSaveRequest.TemplateSetting obj4 = new SmartpicPictagSchedulepicSaveRequest.TemplateSetting();
SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayer obj5 = new SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayer();
obj5.setRotate("0.1");
obj5.setImageUrl("https://gw.alicdn.com/imgextra/O1CN012JsWJzDjNUnyxS9_!!263669477-0-picasso.jpg");
obj5.setWidth(80L);
obj5.setX(20L);
obj5.setY(20L);
obj5.setOpacity("0.1");
obj5.setHeight(80L);
obj4.setDecoratePicLayer(obj5);
SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayer obj6 = new SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayer();
obj6.setRotate("0.1");
obj6.setWidth(80L);
obj6.setX(20L);
obj6.setY(20L);
obj6.setOpacity("0.1");
obj6.setHeight(80L);
obj4.setSrcPicLayer(obj6);
List<SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayer> list8 = new ArrayList<SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayer>();
SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayer obj9 = new SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayer();
list8.add(obj9);
obj9.setRotate("0.1");
obj9.setColor("red");
obj9.setTextAlign("center");
obj9.setLetterSpacing("0.1");
obj9.setTextDecoration("throuth");
obj9.setTextType("fix");
obj9.setFontStyle("font_style");
obj9.setFontFamily("font_family");
obj9.setDecimalFontSize(8L);
obj9.setWidth(80L);
obj9.setX(20L);
obj9.setY(20L);
obj9.setFontSize(10L);
obj9.setLineHeight(10L);
obj9.setOpacity("0.1");
obj9.setPriceLayerKind("price");
obj9.setFontWeight("bold");
obj9.setDirection("vertical");
obj9.setHeight(80L);
SmartpicPictagSchedulepicSaveRequest.LayerEffectShadow obj11 = new SmartpicPictagSchedulepicSaveRequest.LayerEffectShadow();
obj11.setX(1L);
obj11.setY(1L);
obj11.setColor("red");
obj11.setOpacity("0.1");
obj11.setBlur("0.1");
list10.setShadow(obj11);
SmartpicPictagSchedulepicSaveRequest.LayerEffectStroke obj13 = new SmartpicPictagSchedulepicSaveRequest.LayerEffectStroke();
obj13.setOpacity("0.1");
obj13.setColor("red");
obj13.setType("center");
obj13.setWidth(2L);
list12.setStroke(obj13);
obj4.setPriceLayer(list8);
obj1.setTemplateSetting(obj4);
obj1.setId(123L);
SmartpicPictagSchedulepicSaveRequest.PictagPriceRuleDTO obj14 = new SmartpicPictagSchedulepicSaveRequest.PictagPriceRuleDTO();
obj14.setShowUnitPrice(true);
obj14.setMakeUpType(1L);
obj14.setSellProfitString1("123");
obj14.setSellProfitString2("123");
obj14.setUnitPriceSuffix("包");
obj14.setMakeUpNum(2L);
obj14.setPriceExpressType(2L);
obj14.setUnitPriceCount(10L);
obj14.setSkuId(123L);
obj1.setPriceRule(obj14);
obj1.setPreview(true);
req.setSaveUnitRequest(obj1);
SmartpicPictagSchedulepicSaveResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
SmartpicPictagSchedulepicSaveRequest req = new SmartpicPictagSchedulepicSaveRequest();
SmartpicPictagSchedulepicSaveRequest.SaveUnitRequestDomain obj1 = new SmartpicPictagSchedulepicSaveRequest.SaveUnitRequestDomain();
SmartpicPictagSchedulepicSaveRequest.DeliverySettingDomain obj2 = new SmartpicPictagSchedulepicSaveRequest.DeliverySettingDomain();
obj2.StartTime = 1676898078000L;
obj2.EndTime = 1676898078000L;
obj1.DeliverySetting= obj2;
obj1.ItemId = 123L;
SmartpicPictagSchedulepicSaveRequest.SrcPicSettingDomain obj3 = new SmartpicPictagSchedulepicSaveRequest.SrcPicSettingDomain();
obj3.UseItemNormalSrcPic = false;
obj3.Size = "1:1";
obj3.SpecialSrcPic = "https://gw.alicdn.com/imgextra/O1CN012JsWJzDjNUnyxS9_!!263669477-0-picasso.jpg";
obj1.SrcPicSetting= obj3;
obj1.JuId = 1234L;
SmartpicPictagSchedulepicSaveRequest.TemplateSettingDomain obj4 = new SmartpicPictagSchedulepicSaveRequest.TemplateSettingDomain();
SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayerDomain obj5 = new SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayerDomain();
obj5.Rotate = "0.1";
obj5.ImageUrl = "https://gw.alicdn.com/imgextra/O1CN012JsWJzDjNUnyxS9_!!263669477-0-picasso.jpg";
obj5.Width = 80L;
obj5.X = 20L;
obj5.Y = 20L;
obj5.Opacity = "0.1";
obj5.Height = 80L;
obj4.DecoratePicLayer= obj5;
SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayerDomain obj6 = new SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayerDomain();
obj6.Rotate = "0.1";
obj6.Width = 80L;
obj6.X = 20L;
obj6.Y = 20L;
obj6.Opacity = "0.1";
obj6.Height = 80L;
obj4.SrcPicLayer= obj6;
List<SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayerDomain> list8 = new List<SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayerDomain>();
SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayerDomain obj9 = new SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayerDomain();
list8.Add(obj9);
obj9.Rotate = "0.1";
obj9.Color = "red";
obj9.TextAlign = "center";
obj9.LetterSpacing = "0.1";
obj9.TextDecoration = "throuth";
obj9.TextType = "fix";
obj9.FontStyle = "font_style";
obj9.FontFamily = "font_family";
obj9.DecimalFontSize = 8L;
obj9.Width = 80L;
obj9.X = 20L;
obj9.Y = 20L;
obj9.FontSize = 10L;
obj9.LineHeight = 10L;
obj9.Opacity = "0.1";
obj9.PriceLayerKind = "price";
obj9.FontWeight = "bold";
obj9.Direction = "vertical";
obj9.Height = 80L;
SmartpicPictagSchedulepicSaveRequest.LayerEffectShadowDomain obj10 = new SmartpicPictagSchedulepicSaveRequest.LayerEffectShadowDomain();
obj10.X = 1L;
obj10.Y = 1L;
obj10.Color = "red";
obj10.Opacity = "0.1";
obj10.Blur = "0.1";
obj9.Shadow= obj10;
SmartpicPictagSchedulepicSaveRequest.LayerEffectStrokeDomain obj11 = new SmartpicPictagSchedulepicSaveRequest.LayerEffectStrokeDomain();
obj11.Opacity = "0.1";
obj11.Color = "red";
obj11.Type = "center";
obj11.Width = 2L;
obj9.Stroke= obj11;
obj4.PriceLayer= list8;
obj1.TemplateSetting= obj4;
obj1.Id = 123L;
SmartpicPictagSchedulepicSaveRequest.PictagPriceRuleDTODomain obj12 = new SmartpicPictagSchedulepicSaveRequest.PictagPriceRuleDTODomain();
obj12.ShowUnitPrice = true;
obj12.MakeUpType = 1L;
obj12.SellProfitString1 = "123";
obj12.SellProfitString2 = "123";
obj12.UnitPriceSuffix = "包";
obj12.MakeUpNum = 2L;
obj12.PriceExpressType = 2L;
obj12.UnitPriceCount = 10L;
obj12.SkuId = 123L;
obj1.PriceRule= obj12;
obj1.Preview = true;
req.SaveUnitRequest_ = obj1;
SmartpicPictagSchedulepicSaveResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new SmartpicPictagSchedulepicSaveRequest;
$save_unit_request = new SaveUnitRequest;
$delivery_setting = new DeliverySetting;
$delivery_setting->start_time="1676898078000";
$delivery_setting->end_time="1676898078000";
$save_unit_request->delivery_setting = $delivery_setting;
$save_unit_request->item_id="123";
$src_pic_setting = new SrcPicSetting;
$src_pic_setting->use_item_normal_src_pic="false";
$src_pic_setting->size="1:1";
$src_pic_setting->special_src_pic="https://gw.alicdn.com/imgextra/O1CN012JsWJzDjNUnyxS9_!!263669477-0-picasso.jpg";
$save_unit_request->src_pic_setting = $src_pic_setting;
$save_unit_request->ju_id="1234";
$template_setting = new TemplateSetting;
$decorate_pic_layer = new PicTagLiteImageLayer;
$decorate_pic_layer->rotate="0.1";
$decorate_pic_layer->image_url="https://gw.alicdn.com/imgextra/O1CN012JsWJzDjNUnyxS9_!!263669477-0-picasso.jpg";
$decorate_pic_layer->width="80";
$decorate_pic_layer->x="20";
$decorate_pic_layer->y="20";
$decorate_pic_layer->opacity="0.1";
$decorate_pic_layer->height="80";
$template_setting->decorate_pic_layer = $decorate_pic_layer;
$src_pic_layer = new PicTagLiteImageLayer;
$src_pic_layer->rotate="0.1";
$src_pic_layer->width="80";
$src_pic_layer->x="20";
$src_pic_layer->y="20";
$src_pic_layer->opacity="0.1";
$src_pic_layer->height="80";
$template_setting->src_pic_layer = $src_pic_layer;
$price_layer = new PriceDynamicLayer;
$price_layer->rotate="0.1";
$price_layer->color="red";
$price_layer->text_align="center";
$price_layer->letter_spacing="0.1";
$price_layer->text_decoration="throuth";
$price_layer->text_type="fix";
$price_layer->font_style="font_style";
$price_layer->font_family="font_family";
$price_layer->decimal_font_size="8";
$price_layer->width="80";
$price_layer->x="20";
$price_layer->y="20";
$price_layer->font_size="10";
$price_layer->line_height="10";
$price_layer->opacity="0.1";
$price_layer->price_layer_kind="price";
$price_layer->font_weight="bold";
$price_layer->direction="vertical";
$price_layer->height="80";
$shadow = new LayerEffectShadow;
$shadow->x="1";
$shadow->y="1";
$shadow->color="red";
$shadow->opacity="0.1";
$shadow->blur="0.1";
$price_layer->shadow = $shadow;
$stroke = new LayerEffectStroke;
$stroke->opacity="0.1";
$stroke->color="red";
$stroke->type="center";
$stroke->width="2";
$price_layer->stroke = $stroke;
$template_setting->price_layer = $price_layer;
$save_unit_request->template_setting = $template_setting;
$save_unit_request->id="123";
$price_rule = new PictagPriceRuleDTO;
$price_rule->show_unit_price="true";
$price_rule->make_up_type="1";
$price_rule->sell_profit_string1="123";
$price_rule->sell_profit_string2="123";
$price_rule->unit_price_suffix="包";
$price_rule->make_up_num="2";
$price_rule->price_express_type="2";
$price_rule->unit_price_count="10";
$price_rule->sku_id="123";
$save_unit_request->price_rule = $price_rule;
$save_unit_request->preview="true";
$req->setSaveUnitRequest(json_encode($save_unit_request));
$resp = $c->execute($req, $sessionKey);
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.smartpic.pictag.schedulepic.save' \
-d 'partner_id=apidoc' \
-d 'session=9541a24f-fa2b-46f8-9a3a-f18c6a9c052c' \
-d 'sign=2D712ABD69BD35FBC3F2C8679546446C' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-29+06%3A33%3A47' \
-d 'v=2.0' \
-d 'save_unit_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.SmartpicPictagSchedulepicSaveRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.save_unit_request="数据结构示例JSON格式"
try:
resp= req.getResponse(sessionkey)
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.smartpic.pictag.schedulepic.save");
add_param(pRequest,"save_unit_request","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,sessionKey);
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.smartpic.pictag.schedulepic.save', {
'save_unit_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})