(SSG-WSG)检索课程API和课程详细信息API的返回值不匹配

时间:2019-11-06 06:10:38

标签: api

对于同一课程参考号,statisticsSummarysupport > period的返回值不同:

  • 对于statisticsSummary,“检索课程”返回null,但“课程详细信息”中存在数据。
  • 对于support > period,检索课程中的fromto是相反的。

检索课程

# https://public-api.ssg-wsg.sg/courses/directory?pageSize=10&page=0&keyword=coc%20bim

{
  "data": {
    "courses": [
      {
        ...
        "referenceNumber": "ITE-T08GB0022B-01-DM1003CS",
        ...
        "statisticsSummary": null,
        ...
        "support": [
          {
            ...
            "period": {
              "from": "2021-03-31T00:00:00Z",
              "to": ""
            },
          }
        ],
        ...
      },

课程详细信息

# https://public-api.ssg-wsg.sg/courses/directory/ITE-T08GB0022B-01-DM1003CS

{
  "data": {
    "courses": [
      {
        ...
        "referenceNumber": "ITE-T08GB0022B-01-DM1003CS",
        ...
        "statisticsSummary": {
          "courseReferenceNumber": "ITE-T08GB0022B-01-DM1003CS",
          "pageViewCount": 85
        },
        ...
        "support": [
          {
            ...
            "period": {
              "from": 20180524,
              "to": 20210331
            },
            ...
          }
        ],
        ...
      }
    ]
  },
  ...
}

1 个答案:

答案 0 :(得分:-2)

这里是来自SSG-WSG API平台小组的Shan。

有关“ statisticsSummary”的返回值,请使用“课程详细信息” API中返回的值。

对于Retrieve Courses API,我了解“ period”的返回值已得到纠正。您不妨再试一次。

感谢您与我们分享您的反馈!