1688api接口

什么是API接口

api接口指应用程序编程接口,通过api接口可以实现特定的功能,而不需要了解内部实现细节。api接口可以理解为特定服务的一种封装,将服务封装起来提供给其他人调用,这样很多功能不需要从新开发。

常见的api有以下几种形式:

HTTP类型接口:基于HTTP协议提供的API,这类API常常以“网址”形式提供的,像现在主流的RESTful就属于这类接口。

RPC接口:RPC它是指远程过程调用,将一部分代码逻辑放在远程服务器上部署,然后在需要的地方调用即可(调用远程方法就像调用本地方法一样),本质上是Client/Server模式,而且支持多种协议和数据传输方式。

Web Service 接口:Web Service并不具象地指某种API

我们以1688API接口为例:

我需要1688详情信息

HTTP类型接口:

请求URL
http://xxx.xxx.xxx.xxx:xxxx/get_item&itemid=

itemid输入ID
通过接口可以快速的获取我们想要的信息

返回参数

data: {
detailModel: {
detailUrl: "https://g.alicdn.com/takla-group/app-detail/detail/p/index.html?url=http://img04.taobaocdn.com/tfscom/TB1_IfRqsieb18jSZFvXXaI3FXa",
h5DataModel: {
picPrivateNoAuth: "false"
},
offerId: "610947572360"
},
filterModel: null,
industryOfferDetailModel: null,
layoutProtocol: {
cacheTime: "60",
components: [
{
arrangement: "full_column",
componentData: "{"componentType":"detail_image_banner","trackInfo":{"expoData":"object_type@video^bizScene@offerDetail^object_id@254600009298^offerId@610947572360^videoId@254600009298^fromSource@offerDetail^sellerUserId@2206619673102^atmosphere@normal^useCase@1688detail^role@defaultBuyer^business@slsj^channel@dsc^offerId@610947572360^scene@default","uiTrackInfo":{"od_live_click":{"args":{"atmosphere":"normal","expoData":"atmosphere@normal^useCase@1688detail^role@defaultBuyer^business@slsj^channel@dsc^offerId@610947572360^scene@default","useCase":"1688detail","role":"defaultBuyer","business":"slsj","channel":"dsc","offerId":"610947572360","scene":"default"}},"videoPlay":{"args":{"atmosphere":"normal","expoData":"object_type@video^bizScene@offerDetail^object_id@254600009298^offerId@610947572360^videoId@254600009298^fromSource@offerDetail^sellerUserId@2206619673102^atmosphere@normal^useCase@1688detail^role@defaultBuyer^business@slsj^channel@dsc^offerId@610947572360^scene@default","useCase":"1688detail","role":"defaultBuyer","business":"slsj","channel":"dsc","bizScene":"offerDetail","offerId":"610947572360","videoId":"254600009298","fromSource":"offerDetail","scene":"default"}}}},"data":{"offerImgList":["https://cbu01.alicdn.com/img/ibank/2020/063/830/13235038360_979836901.jpg","https://cbu01.alicdn.com/img/ibank/2020/445/748/13819847544_979836901.jpg","https://cbu01.alicdn.com/img/ibank/2020/487/543/13234345784_979836901.jpg","https://cbu01.alicdn.com/img/ibank/2020/296/695/13418596692_979836901.jpg","https://cbu01.alicdn.com/img/ibank/2020/167/778/13462877761_979836901.jpg"],"trackInfo":{"expoData":"object_type@video^bizScene@offerDetail^object_id@254600009298^offerId@610947572360^videoId@254600009298^fromSource@offerDetail^sellerUserId@2206619673102","uiTrackInfo":{"od_live_click":{"args":{"offerId":"610947572360"}},"videoPlay":{"args":{"expoData":"object_type@video^bizScene@offerDetail^object_id@254600009298^offerId@610947572360^videoId@254600009298^fromSource@offerDetail^sellerUserId@2206619673102","bizScene":"offerDetail","offerId":"610947572360","videoId":"254600009298","fromSource":"offerDetail"}}}},"videoUrl":"https://cloud.video.taobao.com/play/u/2206619673102/p/2/e/6/t/1/254600009298.mp4","offerId":"610947572360","videoId":254600009298,"isPrivacy":false,"liveInfoModel":{},"offerInfoModel":{"price":"799.00","offerId":610947572360,"title":"官网Qin2 pro多亲AI手机戒网瘾学生机智能助手同学防沉迷4G手机","isFav":false}}}",
componentType: "detail_image_banner",
dataBinding: {
apiType: "local",
loadingMethods: "synchro",
needEcode: "false",
needLogin: "false"
},
extraInfo: {
androidDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_image_banner/1612233116011/detail_image_banner.zip",
dinamicTemplateVerion: "14",
iosDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_image_banner/1612233116011/detail_image_banner.zip"
},
id: "591899102037",
renderType: "dinamic",
spmc: "a262eq.8239380.591899102037.0",
styleBinding: {
height: "240",
layoutType: "default",
paddingBottom: "9"
},
templateUrl: "https://dinamicx.alibabausercontent.com/pub/detail_image_banner/1612233116011/detail_image_banner.zip",
type: "view",
version: "14"
},
{
arrangement: "full_column",
componentData: "{"componentType":"detail_od_scene_tab","trackInfo":{"expoData":"atmosphere@normal^useCase@1688detail^role@defaultBuyer^business@slsj^channel@dsc^offerId@610947572360^scene@default"},"data":{"selectedScene":{"sceneKey":"order","sceneName":"现货"},"coord":{"atmosphere":"normal","useCase":"1688detail","role":"defaultBuyer","business":"slsj","channel":"dsc","scene":"default"},"sceneList":[{"wapUrl":"https://m.1688.com/offer/610947572360.html?urlParam=sk%3dorder&sk=order","sceneKey":"order","sceneName":"现货"},{"wapUrl":"https://m.1688.com/offer/610947572360.html?urlParam=sk%3dconsign&sk=consign","sceneKey":"distribution","sceneName":"分销"}]}}",
componentType: "detail_od_scene_tab",
dataBinding: {
apiType: "local",
loadingMethods: "synchro",
needEcode: "false",
needLogin: "false"
},
id: "591899102121",
renderType: "native",
spmc: "a262eq.8239380.591899102121.0",
type: "view",
version: "0.0.1"
},
{
arrangement: "full_column",
componentData: "{"componentType":"detail_od_b_price_title","trackInfo":{"expoData":"atmosphere@normal^useCase@1688detail^role@defaultBuyer^business@slsj^channel@dsc^offerId@610947572360^scene@default"}}",
componentType: "detail_od_b_price_title",
dataBinding: {
apiType: "local",
loadingMethods: "synchro",
needEcode: "false",
needLogin: "false"
},
extraInfo: {
androidDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_b_price_title/1614672258170/detail_od_b_price_title.zip",
dinamicTemplateVerion: "8",
iosDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_b_price_title/1614672258170/detail_od_b_price_title.zip"
},
id: "591899102038",
renderType: "dinamic",
spmc: "a262eq.8239380.591899102038.0",
templateUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_b_price_title/1614672258170/detail_od_b_price_title.zip",
type: "view",
version: "8"
},
{
arrangement: "full_column",
componentData: "{"componentType":"detail_od_price_default_two","trackInfo":{"expoData":"atmosphere@normal^useCase@1688detail^role@defaultBuyer^business@slsj^channel@dsc^offerId@610947572360^scene@default"},"data":{"condition":"2部起批","offerId":610947572360,"priceBegin":"799.00","needRadius":true}}",
componentType: "detail_od_price_default_two",
dataBinding: {
apiType: "local",
loadingMethods: "synchro",
needEcode: "false",
needLogin: "false"
},
extraInfo: {
androidDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_price_default_two/1616586268434/detail_od_price_default_two.zip",
dinamicTemplateVerion: "23",
iosDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_price_default_two/1616586268434/detail_od_price_default_two.zip"
},
id: "591899102036",
renderType: "dinamic",
spmc: "a262eq.8239380.591899102036.0",
templateUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_price_default_two/1616586268434/detail_od_price_default_two.zip",
type: "view",
version: "23"
},
{
arrangement: "full_column",
componentData: "{"componentType":"detail_od_product_discounts"}",
componentType: "detail_od_product_discounts",
dataBinding: {
apiType: "local",
loadingMethods: "synchro",
needEcode: "false",
needLogin: "false"
},
extraInfo: {
androidDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_product_discounts/1615776839611/detail_od_product_discounts.zip",
dinamicTemplateVerion: "20",
iosDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_product_discounts/1615776839611/detail_od_product_discounts.zip"
},
id: "591899102999",
renderType: "dinamic",
spmc: "a262eq.8239380.591899102999.0",
templateUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_product_discounts/1615776839611/detail_od_product_discounts.zip",
type: "view",
version: "20"
},
{
arrangement: "full_column",
componentData: "{"componentType":"detail_od_company_feature","trackInfo":{"expoData":"atmosphere@normal^useCase@1688detail^role@defaultBuyer^business@slsj^channel@dsc^offerId@610947572360^scene@default"},"data":{"iconWidth":"59","bgColor":"#FFFFFF","detail":"闪电发货 无忧包换 品质保障","iconUrl":"https://gw.alicdn.com/imgextra/i3/O1CN01gYwEmK1SjesN9Vnxk_!!6000000002283-2-tps-170-42.png","textColor":"#666666"}}",
componentType: "detail_od_company_feature",
dataBinding: {
apiType: "local",
loadingMethods: "synchro",
needEcode: "false",
needLogin: "false"
},
extraInfo: {
androidDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_company_feature/1613981970737/detail_od_company_feature.zip",
dinamicTemplateVerion: "10",
dxAndroidPath: "https://dinamicx.alibabausercontent.com/pub/detail_od_company_feature/1613981970737/detail_od_company_feature.zip",
dxH5Path: "https://dinamicx.alibabausercontent.com/pub/detail_od_company_feature/1613981970737/detail_od_company_feature_h5.js",
dxIosPath: "https://dinamicx.alibabausercontent.com/pub/detail_od_company_feature/1613981970737/detail_od_company_feature.zip",
iosDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_company_feature/1613981970737/detail_od_company_feature.zip"
},
id: "591899102998",
renderType: "dinamic",
spmc: "a262eq.8239380.591899102998.0",
templateUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_company_feature/1613981970737/detail_od_company_feature.zip",
type: "view",
version: "10"
},
{
arrangement: "full_column",
componentData: "{"componentType":"detail_od_title","trackInfo":{"expoData":"atmosphere@normal^useCase@1688detail^role@defaultBuyer^business@slsj^channel@dsc^offerId@610947572360^scene@default"},"data":{"tagList":[],"scrollList":[{"prefix":"已售","icon":"https://gw.alicdn.com/tfs/TB1i14AeQcx_u4jSZFlXXXnUFXa-33-42.png","text":"<10","suffix":"部","textColor":"#999999","highLightTextColor":"#999999"},{"prefix":"","icon":"https://gw.alicdn.com/tfs/TB1i14AeQcx_u4jSZFlXXXnUFXa-33-42.png","text":"100+","suffix":"人想买","textColor":"#999999","highLightTextColor":"#999999"}],"complexTagList":[],"wantBuy":"109","offerId":610947572360,"title":"官网Qin2 pro多亲AI手机戒网瘾学生机智能助手同学防沉迷4G手机","selledNumber":"0"}}",
componentType: "detail_od_title",
dataBinding: {
apiType: "local",
loadingMethods: "synchro",
needEcode: "false",
needLogin: "false"
},
extraInfo: {
androidDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_title/1597926128008/detail_od_title.zip",
dinamicTemplateVerion: "25",
dxAndroidPath: "https://dinamicx.alibabausercontent.com/pub/detail_od_title/1597241497401/detail_od_title.zip",
dxH5Path: "https://dinamicx.alibabausercontent.com/pub/detail_od_title/1597241497401/detail_od_title_h5.js",
dxIosPath: "https://dinamicx.alibabausercontent.com/pub/detail_od_title/1597241497401/detail_od_title.zip",
iosDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_title/1597926128008/detail_od_title.zip"
},
id: "591899102996",
renderType: "dinamic",
spmc: "a262eq.8239380.591899102996.0",
templateUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_title/1597926128008/detail_od_title.zip",
type: "view",
version: "25"
},
{
arrangement: "full_column",
componentData: "{}",
componentType: "detail_od_product_feature",
dataBinding: {
apiName: "mtop.taobao.widgetService.getJsonComponent",
apiType: "mtop",
apiVersion: "1.0",
loadingMethods: "synchro",
needEcode: "false",
needLogin: "false",
param: {
cid: "getOfferSellingPoint:getOfferSellingPoint",
methodName: "execute",
params: {
offerId: "${offerId}"
}
}
},
extraInfo: {
androidDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_product_feature/1612165972285/detail_od_product_feature.zip",
dinamicTemplateVerion: "11",
dxAndroidPath: "https://dinamicx.alibabausercontent.com/pub/detail_od_product_feature/1597322308264/detail_od_product_feature.zip",
dxH5Path: "https://dinamicx.alibabausercontent.com/pub/detail_od_product_feature/1597322308264/detail_od_product_feature_h5.js",
dxIosPath: "https://dinamicx.alibabausercontent.com/pub/detail_od_product_feature/1597322308264/detail_od_product_feature.zip",
iosDinamicCdnUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_product_feature/1612165972285/detail_od_product_feature.zip"
},
id: "591899102051",
renderType: "dinamic",
spmc: "a262eq.8239380.591899102051.0",
templateUrl: "https://dinamicx.alibabausercontent.com/pub/detail_od_product_feature/1612165972285/detail_od_product_feature.zip",
type: "view",
version: "11"
},
{
arrangement: "full_column",
componentData: "{}",
componentType: "detail_od_open_vip_tips",
dataBinding: {
apiName: "mtop.taobao.widgetService.getJsonComponent",
apiType: "mtop",
apiVersion: "1.0",
loadingMethods: "synchro",
needEcode: "false",
needLogin: "false",
param: {
cid: "LaunchZhuKeServiceForCard:LaunchZhuKeServiceForCard",
methodName: "execute",
params: {
offerId: "${offerId}",
sceneFlag: "offerDetail",
sellerMemberId: "${sellerMemberId}",
sellerUserId: "${sellerUserId}",
type: "app1688"
}

文章仅记录工作、学习中遇到的问题和成果,如果有异议,及时联系我处理,谢谢!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值