HPU timetable software of Henan University of Technology

Keywords: Database PHP Programming Mobile

HpuTimetableAPI

Background open interface of [HPU timetable] software

  • It includes the whole course library of the second semester 2017-2018 of Henan University of technology
  • 23 colleges, 901 classes, 5647 courses, 20241 course records
  • Rubbing class function
  • Sharing courses
  • Scan code import
  • course management
  • Course library management
  • No account login required

Tips

  • The request address in the following interface is not a complete request address, and the API service has been deployed on my server.
    So you need to add a base address http://www.liuzhangfei.com/timetable when using the API/
  • Parameter requests of the following API s are all in POST mode
  • The status code only needs to know that 200 is successful, and other status only needs the content of Toast msg
  • For the database structure, you can refer to timetable.sql in extras folder to establish a database named timetable, and import the file

API

1. Search major

Url:
    index.php?c=Timetable&a=findMajor

Params:
    major: Keyword

Return Example:(parameter major:Software)
    {"code":200,"msg":"Success","data":[{"id":"775","name":"Software 15-1"},{"id":"776","name":"Software 15-2"},{"id":"777","name":"Software 15-3"},{"id":"778","name":"Software 15-4"},{"id":"779","name":"Software 16-1"},{"id":"780","name":"Software 16-2"},{"id":"781","name":"Software 16-3"},{"id":"782","name":"Software 16-4"}]}

2. Search courses by major

Url:
    index.php?c=Timetable&a=getByMajor

Params:
    major: Professional full name

Return Example:(parameter major:Software15-1)
    {"code":200,"msg":"Success","data":{"havetime":[{"id":"4952","term":"2017-2018 Autumn of school year","name":"Compiling principle","room":"Computer complex building 205","major":"Software 15-1","teacher":"Chen Feng","weeks":"1-12 Zhou Shang","start":"1","step":"2","day":"1"},{"id":"4953","term":"2017-2018 Autumn of school year","name":"Internet of things mobile application development","room":"Computer complex building 202","major":"Software 15-1","teacher":"Liu Yong Li","weeks":"6-12,14 Zhou Shang","start":"3","step":"2","day":"1"},{"id":"4954","term":"2017-2018 Autumn of school year","name":"Entrepreneurial foundation and employment guidance","room":"3 No. 3303 teaching building","major":"Software 15-1","teacher":"Shui Jun Shu","weeks":"1-12 Zhou Shang","start":"5","step":"2","day":"1"},{"id":"4955","term":"2017-2018 Autumn of school year","name":"Network and information security","room":"Computer complex building 106","major":"Software 15-1","teacher":"Tang Yong Li","weeks":"1-6 Zhou Shang","start":"9","step":"2","day":"1"},{"id":"4956","term":"2017-2018 Autumn of school year","name":"operating system","room":"Computer complex building 203","major":"Software 15-1","teacher":"Zhang Lei","weeks":"1-12 Zhou Shang","start":"3","step":"2","day":"2"},{"id":"4957","term":"2017-2018 Autumn of school year","name":"Game programming","room":"Computer complex building 110","major":"Software 15-1","teacher":"Ying Gang Zhao","weeks":"1-9 Zhou Shang","start":"9","step":"2","day":"2"},{"id":"4958","term":"2017-2018 Autumn of school year","name":"Compiling principle","room":"Computer complex building 205","major":"Software 15-1","teacher":"Chen Feng","weeks":"1-12 Zhou Shang","start":"1","step":"2","day":"3"},{"id":"4959","term":"2017-2018 Autumn of school year","name":"Software quality assurance and testing","room":"Computer complex building 202","major":"Software 15-1","teacher":"Lu Bao Yun","weeks":"1-12 Zhou Shang","start":"3","step":"2","day":"3"},{"id":"4960","term":"2017-2018 Autumn of school year","name":"Physical distribution management","room":"Economic management building 1104","major":"Software 15-1","teacher":"Fan Zhiqiang","weeks":"1-8 Zhou Shang","start":"5","step":"2","day":"3"},{"id":"4961","term":"2017-2018 Autumn of school year","name":"Network and information security","room":"Computer complex building 106","major":"Software 15-1","teacher":"Tang Yong Li","weeks":"1-6 Zhou Shang","start":"9","step":"2","day":"3"},{"id":"4962","term":"2017-2018 Autumn of school year","name":"operating system","room":"Computer complex building 202","major":"Software 15-1","teacher":"Zhang Lei","weeks":"1-12 Zhou Shang","start":"1","step":"2","day":"4"},{"id":"4963","term":"2017-2018 Autumn of school year","name":"Game programming","room":"Computer complex building 110","major":"Software 15-1","teacher":"Ying Gang Zhao","weeks":"1-9 Zhou Shang","start":"3","step":"2","day":"4"},{"id":"4964","term":"2017-2018 Autumn of school year","name":"Physical distribution management","room":"Economic management building 1104","major":"Software 15-1","teacher":"Fan Zhiqiang","weeks":"1-8 Zhou Shang","start":"5","step":"2","day":"4"},{"id":"4965","term":"2017-2018 Autumn of school year","name":"Internet of things mobile application development","room":"Computer complex building 106","major":"Software 15-1","teacher":"Liu Yong Li","weeks":"6-12,14 Zhou Shang","start":"1","step":"2","day":"5"},{"id":"4966","term":"2017-2018 Autumn of school year","name":"Software quality assurance and testing","room":"Computer complex building 202","major":"Software 15-1","teacher":"Lu Bao Yun","weeks":"1-12 Zhou Shang","start":"3","step":"2","day":"5"},{"id":"4967","term":"2017-2018 Autumn of school year","name":"Situation and policy-5","room":"2 No. 2106 teaching building","major":"Software 15-1","teacher":"Zhang x Li","weeks":"6 Zhou Shang","start":"5","step":"4","day":"7"},{"id":"4968","term":"2017-2018 Autumn of school year","name":"Programming mode","room":"Computer complex building 202","major":"Software 15-1","teacher":"Ma Yong Qiang","weeks":"9-12,14-17 Zhou Shang","start":"9","step":"2","day":"1"},{"id":"4969","term":"2017-2018 Autumn of school year","name":"Programming mode","room":"Computer complex building 202","major":"Software 15-1","teacher":"Ma Yong Qiang","weeks":"9-12,14-17 Zhou Shang","start":"9","step":"2","day":"3"}],"notime":[{"id":"201","term":"2017-2018 Autumn of school year","name":"Current environmental hot issues","room":"","major":"Software 15-1","teacher":"Wang Ming Shi","weeks":"All week classes","start":"0","step":"0","day":"0"}]}}

2. Search courses by course name

Url:
    index.php?c=Timetable&a=getByName

Params:
    name:Keyword

Return Example:(parameter name:Computer in Chemistry)
    {"code":200,"msg":"Success","data":[{"id":"238","term":"2017-2018 Autumn of school year","name":"The application of computer in Chemistry","room":"Physical and chemical complex building 207","major":null,"teacher":"Zhao Xiaolei","weeks":"16 Zhou Shang","start":"3","step":"2","day":"2"},{"id":"239","term":"2017-2018 Autumn of school year","name":"The application of computer in Chemistry","room":"Physical and chemical complex building 207","major":null,"teacher":"Zhao Xiaolei","weeks":"10-12,14-15 Zhou Shang","start":"3","step":"2","day":"2"},{"id":"247","term":"2017-2018 Autumn of school year","name":"The application of computer in Chemistry","room":"Physical and chemical complex building 207","major":null,"teacher":"Zhao Xiaolei","weeks":"10-12,14-15 Zhou Shang","start":"1","step":"2","day":"4"}]}

3. storage
This interface can be used for the function of scanning and importing curriculum codes. When sharing courses, the data can be stored in the database, and the returned id can be generated into a two-dimensional code. When importing, only the data can be extracted according to the id

Url:
    index.php?c=Timetable&a=putValue

Params:
    value:content

Return Example:(parameter value:This interface can be used for the function of scanning and importing lesson codes. When sharing a lesson, the data can be stored in the database and the returned id Generate QR code. When importing, you only need to id Just extract the data")
    {"code":200,"msg":"Success","data":{"id":"11314891510b664ac8e20938c9c715ba","value":"This interface can be used for the function of scanning and importing lesson codes. When sharing lessons, the data can be stored in the database and the returned id Generate QR code. When importing, you only need to id Just extract the data"}}

4. extraction

Url:
    index.php?c=Timetable&a=getValue

Params:
    id:Identification

Return Example:(parameter id:11314891510b664ac8e20938c9c715ba)
    {"code":200,"msg":"Success","data":{"id":"11314891510b664ac8e20938c9c715ba","value":"This interface can be used for the function of scanning and importing lesson codes. When sharing a lesson, the data can be stored in the database and the returned id Generate QR code. When importing, you only need to id Just extract the data"}}

Posted by solus on Tue, 31 Mar 2020 08:20:54 -0700