|
注册
首页
联系我们

智慧芽学社课程接口 获取课程列表

获取课程列表公开V1
根据企业ID获取该企业购买的学社课程列表信息。企业可选的课程,请点击这里进行下载。

基本信息

接口地址: /academy/course-list

请求方式: get

返回格式: application/json

登录后即可调试接口,点击 登录/注册

接口说明文档下载

请求参数

query
ParameterTypeRequiredDescriptionSample
company_idstringtrue
企业身份唯一标识
hzipib
pageintegertrue
展示第几页的课程信息
1
limitintegertrue
每页返回的课程数量
10

请求示例

  • Curl
  • NodeJs
  • Python
  • Java
curl -X GET "https://connect.zhihuiya.com/academy/course-list?company_id=hzipib&page=1&limit=10&apikey="
-H "Content-Type:application/json"
-H "authorization:Bearer {token}"
const axios = require('axios');
const options = {
    url: "https://connect.zhihuiya.com/academy/course-list",
    method: "GET",
    headers: {
        'Content-Type': 'application/json',
        'authorization': 'Bearer {token}',
    },
    params: {
        'company_id': 'hzipib',
        'page': '1',
        'limit': '10',
        'apikey': '',
    },
};
axios(options).then(res => {
    console.log(res.data)
}).catch(err => {
    console.log(err)
})
import requests
url = "https://connect.zhihuiya.com/academy/course-list"

params = {
    "company_id": "hzipib",
    "page": "1",
    "limit": "10",
    "apikey": ""
}

payload = None

headers = {
    "Content-Type": "application/json",
    "authorization": "Bearer {token}"
}

response = requests.request("GET", url, params=params, data=payload, headers=headers)

print(response.text)
public static void main(String[] args) {
    String host = "https://connect.zhihuiya.com";
    String path = "/academy/course-list";

    Map headers = new HashMap();
    headers.put("Content-Type", "application/json");
    headers.put("authorization", "Bearer {token}");

    Map querys = new HashMap();
    querys.put("company_id", "hzipib");
    querys.put("page", "1");
    querys.put("limit", "10");
    querys.put("apikey", "");
    try {
        /**
        * Important Tips:
        * Please Download HttpUtils From
        * https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/src/main/java/com/aliyun/api/gateway/demo/util/HttpUtils.java
        *
        * Please refer to the corresponding dependence:
        * https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/pom.xml
        */
        HttpResponse response = HttpUtils.doGet(host, path, null, headers, querys);
        System.out.println(EntityUtils.toString(response.getEntity()));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
复制

返回参数

CommonResponse
ParameterTypeRequiredDescriptionSample
data
objectfalse
响应数据
no sample
status
booleantrue
状态
false
error_msg
stringfalse
错误信息
The request parameter format is incorrect!
error_code
integertrue
错误代码
0
CourseListResponse
ParameterTypeRequiredDescriptionSample
count
integerfalse
企业购买的课程总数
24
course_list_info
arrayfalse
课程信息
Please check the form: CourseListInfo
CourseListInfo
ParameterTypeRequiredDescriptionSample
id
stringfalse
课程的唯一标识
1
thumb
stringfalse
课程的缩略图
https://x-static.cdn.zhihuiya.com/WX20200313-184724.png
title
stringfalse
课程的名称
2018年专代考试贴士及相关法边缘知识点考前串讲

返回状态码

error_codeDescription
0请求成功
68300004请求参数异常!
68300005查询Api失败!
68300006解析基本存取错误!
68300007存在错误的请求!
68300008服务中断异常,请稍后再试!
68300010文件不符合上传规范!
67200001API整体限流错误!
67200002用户调用请求限流限制错误!
67200003申请token的key和secret不正确或者状态错误!
67200004无权限或该接口的套餐已超过系统设置的上限!
67200005账户余额不足,调用失败!
67200006客户端已过期,调用失败!
67200007超过调用额度,调用失败!

返回示例

  • json
{
    "data": {
        "count": 24,
        "course_list_info": [
            {
                "id": 1,
                "thumb": "https://x-static.cdn.zhihuiya.com/WX20200313-184724.png",
                "title": "2018年专代考试贴士及相关法边缘知识点考前串讲"
            }
        ]
    },
    "status": true,
    "error_code": 0
}
复制
[B039] 药物交易信息