大淘客,让选品更简单! |

{{item.type_name}}:

API 市场 / 专辑列表
 

专辑列表
吐槽建议
应用场景:
可用于应用内营销专区的搭建,或者用于社群内的精推
接口说明:
接口返回大淘客官网的高质量专辑作品。大牛推荐商品,高转化高收益
使用人数: 1000+
专辑列表 接口测试 建议使用通用GET方法调用
  • 接口说明
  • 更新日志
  • 接口版本号:v1.0.0

请求地址:https://openapi.dataoke.com/api/album/album-list 复制

请求方式:GET

公共参数:
请求参数:

注:请求参数须区分大小写

返回数据:
调用示例:
String url = "https://openapi.dataoke.com/api/dels/jd/order/get-official-order-list";
String appKey = "xxx";
String appSecret = "xxx";
TreeMap<String, String> paraMap = new TreeMap<>();
paraMap.put("version", "v1.0.0");
paraMap.put("startTime", "2020-11-01 01:00:00");
paraMap.put("endTime", "2020-11-01 02:00:00");
paraMap.put("key", "b57733a7028b09011b3d8bf5cb79f48b2da69d56d3f88df");
String data = ApiClient.sendReq(url, appSecret, paraMap);

SDK调用示例
String appKey = "xxx";
String appSecret = "xxx";
DtkApiClient client = DtkApiClient.getInstance(appKey,appSecret);
DtkAlbumListRequest request = new DtkAlbumListRequest();
request.setAlbumType(0);
request.setPageId("1");
request.setPageSize(20);
request.setSort(0);
DtkApiResponse < DtkPageResponse < DtkAlbumListResponse >> execute = client.execute(request);
    //唯品会商品列表
    $data = [
        'appKey' => "xxxxxxxxxxxx",
        'version' => "v1.0.0",
        ...
    ];
    $host = "https://openapi.dataoke.com/api/dels/jd/order/get-official-order-list";
    $url = $host . '?' . http_build_query($data);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    $output = curl_exec($ch);
    $a = curl_error($ch);
    if(!empty($a)){
        return json_encode(array('code'=>10003, 'msg'=>$a));
    }
    curl_close($ch);
    return $output;

    SDK调用示例
    $client = new GoodsListV2WithOauth();
    $client->setAppKey("xxxxxxxxx");
    $client->setAppSecret("xxxxxxxxxxxxxxxxxxxxxxxxx");
    $client->setVersion("v1.0.0");

    $res = $client->setParams([])->request();
package main

import (
	"fmt"
	"gitee.com/dtk-developer/openapi-sdk-go/sdk"
)

func main() {
	// 1.初始化所需要的参数appKey, appSecret, version
	var (
		appKey = "xxxxxxxxxx"
		appSecret = "xxxxxxxxxx"
		version = "v1.3.1"
	)

	// 2.初始化开放平台api的客户端句柄
	oa := &sdk.OpenApi{}
	oa.AppKey = appKey
	oa.AppSecret = appSecret
	oa.Version = version
	client :=  oa.GetClient()

	// 3.准备请求参数
	params := map[string]string {
		"AlbumList": "0",
	}

	// 4.业务请求,示例使用专辑列表和淘系万能解析接口,其它开放接口使用方法相同
	resp, err := client.AlbumList(params)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp)

	// 复用client句柄
	params = map[string]string {
		// 指定接口版本
		"version": "v1.0.0",
		"content": "1👈¥fym8XiJU9Oi¥ https://s.click.taobao.com/Ys3TNlu  包邮 漫花抽纸10包4层加厚280张/包纸巾卫生纸家用实惠装面巾纸",
	}
	resp, err = client.ParseContent(params)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp)
}
返回示例:
{
    "requestId": "e1d08cefd75c4a13a16416d6d2be992f",
    "time": 1608086099084,
    "code": 0,
    "msg": "成功",
    "data": {
        "list": [
            {
                "id": 47828,
                "title": "近2小时热卖单品·实时更新",
                "label": "实时疯抢榜,1元抢人气款",
                "userName": "天猫消费券领取",
                "headImg": "https://sr.ffquan.cn/bxk_mall/20200506/bqpbofkq57boprr6e05g0.jpg",
                "userGoodAt": [],
                "userDesc": "",
                "goodsCount": 50,
                "likeNum": 2,
                "promoteCount": 160,
                "endType": 1,
                "releaseTime": "2020-05-06 21:35:50",
               "uid": 1390491,
                "endTime": "",
                "goodsList": [
                    {
                        "pic": "https://img.alicdn.com/imgextra/i1/2204273539658/O1CN015IvYMM2LDPnmaJBzz_!!2204273539658.jpg",
                        "goodsid": "609167842605"
                    },
                    {
                        "pic": "https://img.alicdn.com/imgextra/i3/2930255252/O1CN0159ouF21ofSiQ3kPq2_!!2930255252.jpg",
                        "goodsid": "598088771970"
                    },
                    {
                        "pic": "https://img.alicdn.com/imgextra/i2/2206408066045/O1CN01lb42di1uWenKCJjfv_!!2206408066045.jpg",
                        "goodsid": "606881786356"
                    }
                ]
            }
        ],
        "pageId": "",
        "totalNum": 6356,
        "goScroll": false
    }
}
常见错误码:
{
msg: "服务器错误",
code: -1,
time: 1554365022200
}
错误码列表: