Giter Club home page Giter Club logo

huoshui-swjtu-api's Introduction

交大瑞士刀api

尽量遵循RESTful风格编写,但有些地方可能仍然不符合标准

docs

  1. 验证用户身份/获得接口权限
POST https://api.wangzhe.cloud/login
   form={"username":"20132333","password":"123456"}
=>
{
    "statuscode": 0,
    "status": "authorized"
}
  1. 获取基本信息
GET https://api.wangzhe.cloud/info
=>
{
    "statuscode": 0,
    "status": "success",
    "name": "xxx",
    "sex": "男",
    "grade": "2013",//学号除去最后4位
    "major": "软件工程",
    "class": "软件2013-02班"
}
  1. 获取平均分/排名
GET https://api.wangzhe.cloud/rank
=>
{
    "statuscode": 0,
    "status": "success",
    "mean": 100.0,
    "rank": 1,
    "all": 118,
    "validcourses": [
        {
            "name":"线性代数B",
            "score":"100.0"
        },
        ...
     ],
     "invalidcourses": [
        {
            "name":"体育Ⅰ",
            "score":"100.0"
        },
          ...
      ]
}
  1. 获取自定义有效课程下的平均分/排名
POST https://api.wangzhe.cloud/rank
     json=[{"name":"高等数学Ⅰ","score":"100.0"},...]//所有自定义有效课程,由于可能存在重修的情况,故必须带上score
=>
{
    "statuscode": 0,
    "status": "success",
    "mean": 100.0,
    "rank": 1,
    "all": 118,
    "validcourses": [
        {
            "name":"线性代数B",
            "score":"100.0"
        },
        ...
     ],
     "invalidcourses": [
        {
            "name":"体育Ⅰ",
            "score":"100.0"
        },
        ...
    ]
}
  1. 查询老师给分
GET https://api.wangzhe.cloud/courses?name=高等数学
=>
{
    "statuscode": 0,
    "status": "success",
    "courses": [
        {
            "courseid": "6010320",
            "coursename": "高等数学CⅡ",
            "teachers": [
                {
                    "name": "王中宝",
                    "all": "294", //成绩记录总数
                    "E": "27", //60分以下记录数
                    "A": "68", //90分及以上记录数
                    "mean": "76.81",
                    "std": "18.67"
                },
                ...//1到多个老师
            ],
        },
        ...//0到多个课程
    ]
}
  1. 查询所在专业免研主干课程
GET https://api.wangzhe.cloud/majorcourses
=>
{
    "statuscode": 0,
    "status": "success",
    "majors": [
        {
            "majorcode": "0408",
            "majorname": "软件工程",
            "collegecode": "04",
            "collegename": "信息科学与技术学院",
            "courses": [
                {
                    "id": "3244153",
                    "name": "编译原理B",
                    "type": "必",
                    "credit": "4.0",
                    "remark": "" //备注
                },
                ...//1到多个课程
            ],
        },
        ...//0到多个专业
    ]
}

其他

  1. 查询接口列表
GET https://api.wangzhe.cloud
=>
  1. 网页登录表单(手动测试用)
GET https://api.wangzhe.cloud/loginform
  1. 查询登录状态/接口权限
GET https://api.wangzhe.cloud/login
已登录=>
{
    "statuscode": 0,
    "status": "authorized"
}
未登录=>
{
    "statuscode": -1,
    "status": "unauthorized"
}

huoshui-swjtu-api's People

Contributors

zhewang95 avatar

Stargazers

Heyuan Xiao avatar  avatar Qiufeng Wang  avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.