HDU-API: A simple SDK for HDU. — hdu-api documenta
  • 简介
  • 安装
  • 快速上手
  • APIS
    • hdu_api
    • 一卡通 API
    • 考试 API
    • 课程 API
    • 个人信息 API
    • 公共信息 API
  • changelog
Powered by GitBook
On this page

Was this helpful?

  1. APIS

课程 API

Previous考试 APINext个人信息 API

Last updated 6 years ago

Was this helpful?

此章节是关于课程 API 的描述。

Course objects

对象提供了一系列课程信息 API。

Constructor:

class hdu_api.Course(session)

参数

type

required

default

备注

session

objects CourseSession

true

无

一个已初始化的 CourseSession 对象

Class methods:

  • classmethod Course.selected(year, term, raw=False, dictionary=DEFAULT_DICTIONARY)

      已选课程。

  • classmethod Course.selected_current(raw=False, dictionary=DEFAULT_DICTIONARY)

      本学期已选课程。

  • classmethod Course.schedule(year, term, raw=False, dictionary=DEFAULT_DICTIONARY)

      课表。

  • classmethod Course.schedule_current(raw=False, dictionary=DEFAULT_DICTIONARY)

      本学期课表。

参数说明:

  • raw - 是否输出为原始格式

  • dictionary - raw 为 true 时,使用该字典替换返回数据的 key

  • year - 学年,格式如 '2018-2019'

  • term - 学期,1 表示第一个学期,2 表示第二个学期

Class attributes:

  • Course.session

      CourseSession 对象。

Course