文档中心 > API类目 > 智能设备

alibaba.ailabs.iot.business.recipe.getdetail (获取食谱详情)

获取食谱详情接口,获取ISV自己的食谱详情数据

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
business_recipe_id Number 必须 1 行业食谱id
open_account_id String 必须 0yl8oK0WFDBwEheQxSMD4g== 开放账号id

响应参数

名称 类型 示例值 描述
result BaseResult 返回包装类
  • └ message
  • String
  • null
  • 信息
  • └ ret_code
  • Number
  • 200
  • 响应code
  • ret_value
  • BusinessRecipeOpenDto
  • 返回结果
  • └ business_recipe_id
  • Number
  • 1
  • 行业食谱id
  • └ description
  • String
  • 美味豆浆
  • 菜谱描述
  • └ function_type
  • Number
  • 1
  • 菜谱功能类型 1 普通食谱 2 智能食谱
  • recipe_image
  • ImageUrlDto
  • xxx
  • 食谱图片
  • └ img
  • String
  • www.img.com
  • 默认图片
  • └ large
  • String
  • www.large.com
  • 大图
  • └ medium
  • String
  • www.medium.com
  • 中图
  • └ small
  • String
  • www.small.com
  • 小图
  • recipe_ingredient_list
  • RecipeIngredientDto []
  • xxx
  • 食谱食材参数列表
  • └ name
  • String
  • xxx
  • 参数名
  • └ weight
  • String
  • xxx
  • 重量及单位
  • └ recipe_name_cn
  • String
  • xxx
  • 食谱中文名
  • recipe_step_list
  • BusinessRecipeStepOpenDto []
  • 食谱步骤列表
  • └ business_recipe_id
  • Number
  • 1
  • 行业食谱id
  • └ business_recipe_step_id
  • Number
  • 1
  • 行业食谱步骤id
  • └ description
  • String
  • 搅拌3分钟
  • 步骤详细描述
  • image_url
  • ImageUrlDto
  • 食谱步骤图url
  • └ img
  • String
  • www.img.com
  • 默认图片
  • └ large
  • String
  • www.large.com
  • 大图
  • └ medium
  • String
  • www.medium.com
  • 中图
  • └ small
  • String
  • www.small.com
  • 小图
  • recipe_step_action_list
  • BusinessRecipeStepActionOpenDto []
  • 食谱步骤指令列表
  • └ action_name
  • String
  • runTime
  • 指令名
  • └ action_type
  • Number
  • 2
  • 指令类型:0:整数型,1:枚举类型,2:浮点类型,3:布尔型,4:字符串,5:时间型,6:JSON对象
  • └ action_value
  • String
  • 3
  • 指令值
  • └ sequence
  • Number
  • 1
  • 指令顺序号
  • └ recipe_step_name
  • String
  • 搅拌3分钟
  • 食谱步骤名
  • └ recipe_step_time
  • Number
  • 180
  • 食谱步骤时间
  • └ sequence
  • Number
  • 1
  • 顺序号
  • └ tips
  • String
  • 步骤提示
  • 食谱步骤提示
  • video_url
  • VideoUrlDto
  • 食谱步骤视频
  • cover
  • ImageUrlDto
  • 视频封面图
  • └ img
  • String
  • www.img.com
  • 默认图片
  • └ large
  • String
  • www.large.com
  • 大图
  • └ medium
  • String
  • www.medium.com
  • 中图
  • └ small
  • String
  • www.small.com
  • 小图
  • └ default_url
  • String
  • www.defaultUrl.com
  • 默认播放链接
  • └ height
  • Number
  • 240
  • 视频高度
  • └ high
  • String
  • www.high.com
  • 高清
  • └ standard
  • String
  • www.standard.com
  • 标清
  • └ ultra
  • String
  • www.ultra.com
  • 超清
  • └ width
  • Number
  • 375
  • 视频宽度
  • └ recipe_time
  • Number
  • 300
  • 食谱时间,单位秒
  • recipe_video
  • VideoUrlDto
  • 食谱视频
  • cover
  • ImageUrlDto
  • 视频封面图
  • └ img
  • String
  • www.img.com
  • 默认图片
  • └ large
  • String
  • www.large.com
  • 大图
  • └ medium
  • String
  • www.medium.com
  • 中图
  • └ small
  • String
  • www.small.com
  • 小图
  • └ default_url
  • String
  • www.defaultUrl.com
  • 默认播放链接
  • └ height
  • Number
  • 240
  • 视频高度
  • └ high
  • String
  • www.high.com
  • 高清
  • └ standard
  • String
  • www.standard.com
  • 标清
  • └ ultra
  • String
  • www.ultra.com
  • 超清
  • └ width
  • Number
  • 375
  • 视频宽度
  • tag_list
  • ContentTagDto []
  • 标签列表
  • └ tag_id
  • Number
  • 8001
  • 标签id
  • └ tag_name
  • String
  • 菜谱标签
  • 标签名称
  • └ tips
  • String
  • 制作5分钟
  • 食谱提示信息
  • └ recipe_type
  • String
  • 1
  • 食谱类型 0视频菜谱 1图文菜谱
  • └ trace_id
  • String
  • 1e0525b315754507465865759e
  • 追踪id

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAilabsIotBusinessRecipeGetdetailRequest req = new AlibabaAilabsIotBusinessRecipeGetdetailRequest();
req.setBusinessRecipeId(1L);
req.setOpenAccountId("0yl8oK0WFDBwEheQxSMD4g==");
AlibabaAilabsIotBusinessRecipeGetdetailResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_ailabs_iot_business_recipe_getdetail_response>
    <result>
        <message>null</message>
        <ret_code>200</ret_code>
        <ret_value>
            <business_recipe_id>1</business_recipe_id>
            <description>美味豆浆</description>
            <function_type>1</function_type>
            <recipe_image>
                <img>www.img.com</img>
                <large>www.large.com</large>
                <medium>www.medium.com</medium>
                <small>www.small.com</small>
            </recipe_image>
            <recipe_ingredient_list>
                <recipe_ingredient_dto>
                    <name>xxx</name>
                    <weight>xxx</weight>
                </recipe_ingredient_dto>
            </recipe_ingredient_list>
            <recipe_name_cn>xxx</recipe_name_cn>
            <recipe_step_list>
                <business_recipe_step_open_dto>
                    <business_recipe_id>1</business_recipe_id>
                    <business_recipe_step_id>1</business_recipe_step_id>
                    <description>搅拌3分钟</description>
                    <image_url>
                        <img>www.img.com</img>
                        <large>www.large.com</large>
                        <medium>www.medium.com</medium>
                        <small>www.small.com</small>
                    </image_url>
                    <recipe_step_action_list>
                        <business_recipe_step_action_open_dto>
                            <action_name>runTime</action_name>
                            <action_type>2</action_type>
                            <action_value>3</action_value>
                            <sequence>1</sequence>
                        </business_recipe_step_action_open_dto>
                    </recipe_step_action_list>
                    <recipe_step_name>搅拌3分钟</recipe_step_name>
                    <recipe_step_time>180</recipe_step_time>
                    <sequence>1</sequence>
                    <tips>步骤提示</tips>
                    <video_url>
                        <cover>
                            <img>www.img.com</img>
                            <large>www.large.com</large>
                            <medium>www.medium.com</medium>
                            <small>www.small.com</small>
                        </cover>
                        <default_url>www.defaultUrl.com</default_url>
                        <height>240</height>
                        <high>www.high.com</high>
                        <standard>www.standard.com</standard>
                        <ultra>www.ultra.com</ultra>
                        <width>375</width>
                    </video_url>
                </business_recipe_step_open_dto>
            </recipe_step_list>
            <recipe_time>300</recipe_time>
            <recipe_video>
                <cover>
                    <img>www.img.com</img>
                    <large>www.large.com</large>
                    <medium>www.medium.com</medium>
                    <small>www.small.com</small>
                </cover>
                <default_url>www.defaultUrl.com</default_url>
                <height>240</height>
                <high>www.high.com</high>
                <standard>www.standard.com</standard>
                <ultra>www.ultra.com</ultra>
                <width>375</width>
            </recipe_video>
            <tag_list>
                <content_tag_dto>
                    <tag_id>8001</tag_id>
                    <tag_name>菜谱标签</tag_name>
                </content_tag_dto>
            </tag_list>
            <tips>制作5分钟</tips>
            <recipe_type>1</recipe_type>
        </ret_value>
        <trace_id>1e0525b315754507465865759e</trace_id>
    </result>
</alibaba_ailabs_iot_business_recipe_getdetail_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

返回
顶部