文档中心 > API类目 > 本地生活API

alibaba.alsc.chuda.widget.action.processing (饿了么桌面组件动作交互接口)

饿了么桌面组件动作交互接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_widget_action_request WidgetActionRequest 必须 入参对象
  • └ action
  • String
  • 可选
  • refresh
  • 动作:add,refresh,jump
  • └ business_type
  • String
  • 可选
  • chihuodou
  • 业务类型
  • └ city_id
  • String
  • 可选
  • 1
  • 城市Id
  • └ device_id
  • String
  • 可选
  • xxxxxxxx
  • 设备Id
  • └ device_type
  • String
  • 可选
  • ios
  • 设备类型:ios、android
  • └ token
  • String
  • 必须
  • 8bwNiPKZJ06d8tjng2nl9+pa2TEY9b2ge2EhQiHfKHk=
  • token
  • └ event_types
  • String
  • 可选
  • receive
  • 事件类型
  • └ ip
  • String
  • 可选
  • 192.168.0.1
  • ip地址
  • └ jump_url
  • String
  • 可选
  • eleme://home
  • action为jump时填写
  • └ latitude
  • String
  • 可选
  • 1.111
  • 纬度
  • └ longitude
  • String
  • 可选
  • 2.222
  • 经度
  • └ user_agent
  • String
  • 可选
  • Rajax/1 Apple/iPhone12,1 iOS/16.1.1 Eleme/10.13.35 ID/45AD6428-F82A-4FEE-84F6-A1A095722FBC; IsJailbroken/0
  • userAgent
  • └ widget_type
  • String
  • 可选
  • eleme_helper
  • 日常活动助手: daily_helper; 饿了么助手:eleme_helper
  • └ app_version
  • String
  • 可选
  • 10.12.30
  • app版本
  • └ district_id
  • String
  • 可选
  • 5255
  • 普陀区区县Id

响应参数

名称 类型 示例值 描述
result Result 出参对象
  • └ code
  • Number
  • 0
  • 错误码 0正常
  • data
  • WidgetActionResponse
  • 数据对象
  • └ background_image
  • String
  • https://gw.alicdn.com/imgextra/i1/O1CN01FrOfcf1oBhBz5lX0Z_!!6000000005187-0-tps-474-474.jpg
  • 组件背景图片
  • base_content
  • BaseContent
  • 基础数据对象
  • └ air_temperature
  • String
  • 36℃
  • 气温
  • └ city_name
  • String
  • 上海
  • 城市
  • └ date
  • String
  • 2022-11-25
  • 日期
  • └ time
  • String
  • 23:22
  • 时间
  • └ weather
  • String
  • 天气
  • └ weather_background
  • String
  • https://gw.alicdn.com/imgextra/i4/O1CN01WL1QLd1Rfhz0OpFeW_!!6000000002139-2-tps-310-317.png
  • 天气背景图
  • └ jump_url
  • String
  • eleme://home
  • 天气区域默认跳转地址
  • event_content_list
  • EventContent []
  • 事件List
  • └ business_name
  • String
  • 吃货豆待领取
  • 业务名称
  • └ business_type
  • String
  • chihuodou
  • 业务类型
  • └ event_info
  • String
  • 您有500吃货豆待领取
  • 事件信息
  • └ event_name
  • String
  • 吃货豆待领取
  • 事件名称
  • └ event_type
  • String
  • receive
  • 事件类型
  • └ jump_url
  • String
  • eleme://home
  • 事件跳转地址
  • └ user_info
  • String
  • 当前持有500吃货豆
  • 用户信息
  • └ event_icon
  • String
  • https://gw.alicdn.com/imgextra/i4/O1CN01XxCFbv1R0wjYNTp6I_!!6000000002050-2-tps-45-45.png
  • 事件Icon
  • └ event_image
  • String
  • https://gw.alicdn.com/imgextra/i2/O1CN01XeDeNd1o1A5C7oHNs_!!6000000005164-2-tps-180-180.png
  • 事件背景图
  • └ default_user_info
  • String
  • 登陆解锁更多精彩
  • 兜底展示用户信息图片
  • └ business_jump_url
  • String
  • eleme://home
  • 业务默认跳转地址
  • └ event_time
  • String
  • 18:30
  • 额外扩展参数
  • └ search_jump_url
  • String
  • eleme://home
  • 搜索页地址
  • └ timestamp
  • String
  • 1669281651111
  • 时间戳 ms
  • └ template_type
  • String
  • chihuodou
  • 模板类型
  • └ event_background
  • String
  • https://gw.alicdn.com/imgextra/i3/O1CN01PFOGaY1ddDDHUELde_!!6000000003758-2-tps-651-287.png
  • 2*4事件区域背景图
  • └ search_icon
  • String
  • https://gw.alicdn.com/imgextra/i4/O1CN014XxQyc2A7xVWUF5nc_!!6000000008157-2-tps-48-48.png
  • 2*4搜索Icon
  • └ eleme_icon
  • String
  • https://gw.alicdn.com/imgextra/i4/O1CN01NgIhPx1WCvAWFy6wy_!!6000000002753-2-tps-72-72.png
  • 2*2饿了么Icon
  • └ trace_id
  • String
  • xxxxxxxxxxxxxxxxxx
  • 鹰眼TraceId
  • └ animation_enable
  • Boolean
  • true
  • true
  • └ msg
  • String
  • 网络异常,请您稍后重试
  • 错误信息
  • └ success
  • Boolean
  • true
  • 是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlscChudaWidgetActionProcessingRequest req = new AlibabaAlscChudaWidgetActionProcessingRequest();
AlibabaAlscChudaWidgetActionProcessingRequest.WidgetActionRequest obj1 = new AlibabaAlscChudaWidgetActionProcessingRequest.WidgetActionRequest();
obj1.setAction("refresh");
obj1.setBusinessType("chihuodou");
obj1.setCityId("1");
obj1.setDeviceId("xxxxxxxx");
obj1.setDeviceType("ios");
obj1.setToken("8bwNiPKZJ06d8tjng2nl9+pa2TEY9b2ge2EhQiHfKHk=");
obj1.setEventTypes("receive");
obj1.setIp("192.168.0.1");
obj1.setJumpUrl("eleme://home");
obj1.setLatitude("1.111");
obj1.setLongitude("2.222");
obj1.setUserAgent("Rajax/1 Apple/iPhone12,1 iOS/16.1.1 Eleme/10.13.35 ID/45AD6428-F82A-4FEE-84F6-A1A095722FBC; IsJailbroken/0");
obj1.setWidgetType("eleme_helper");
obj1.setAppVersion("10.12.30");
obj1.setDistrictId("5255");
req.setParamWidgetActionRequest(obj1);
AlibabaAlscChudaWidgetActionProcessingResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_alsc_chuda_widget_action_processing_response>
    <result>
        <code>0</code>
        <data>
            <background_image>https://gw.alicdn.com/imgextra/i1/O1CN01FrOfcf1oBhBz5lX0Z_!!6000000005187-0-tps-474-474.jpg</background_image>
            <base_content>
                <air_temperature>36℃</air_temperature>
                <city_name>上海</city_name>
                <date>2022-11-25</date>
                <time>23:22</time>
                <weather>晴</weather>
                <weather_background>https://gw.alicdn.com/imgextra/i4/O1CN01WL1QLd1Rfhz0OpFeW_!!6000000002139-2-tps-310-317.png</weather_background>
                <jump_url>eleme://home</jump_url>
            </base_content>
            <event_content_list>
                <event_content>
                    <business_name>吃货豆待领取</business_name>
                    <business_type>chihuodou</business_type>
                    <event_info>您有500吃货豆待领取</event_info>
                    <event_name>吃货豆待领取</event_name>
                    <event_type>receive</event_type>
                    <jump_url>eleme://home</jump_url>
                    <user_info>当前持有500吃货豆</user_info>
                    <event_icon>https://gw.alicdn.com/imgextra/i4/O1CN01XxCFbv1R0wjYNTp6I_!!6000000002050-2-tps-45-45.png</event_icon>
                    <event_image>https://gw.alicdn.com/imgextra/i2/O1CN01XeDeNd1o1A5C7oHNs_!!6000000005164-2-tps-180-180.png</event_image>
                    <default_user_info>登陆解锁更多精彩</default_user_info>
                    <business_jump_url>eleme://home</business_jump_url>
                    <event_time>18:30</event_time>
                </event_content>
            </event_content_list>
            <search_jump_url>eleme://home</search_jump_url>
            <timestamp>1669281651111</timestamp>
            <template_type>chihuodou</template_type>
            <event_background>https://gw.alicdn.com/imgextra/i3/O1CN01PFOGaY1ddDDHUELde_!!6000000003758-2-tps-651-287.png</event_background>
            <search_icon>https://gw.alicdn.com/imgextra/i4/O1CN014XxQyc2A7xVWUF5nc_!!6000000008157-2-tps-48-48.png</search_icon>
            <eleme_icon>https://gw.alicdn.com/imgextra/i4/O1CN01NgIhPx1WCvAWFy6wy_!!6000000002753-2-tps-72-72.png</eleme_icon>
            <trace_id>xxxxxxxxxxxxxxxxxx</trace_id>
            <animation_enable>true</animation_enable>
        </data>
        <msg>网络异常,请您稍后重试</msg>
        <success>true</success>
    </result>
</alibaba_alsc_chuda_widget_action_processing_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部