课表(烟大&文经)

分类展示烟大及文经学院所有班级的课程表格。

请求地址

https://api.mayuko.cn/v2/ytukb

请求方式


HTTPS GET

非文件上传的POST时,enctype=application/x-www-form-urlencoded。

系统级参数

所有接入点需要的参数。

参数名称 类型 示例值 必须 说明
SK string c7acff69c5a5acd08fcc4af108b592dd 必须 每一个用户名对应唯一一个SK值。

应用级参数

每个接入点自己的参数。

参数名称 类型 示例值 必须 说明
xx int 1 必须 学校
0:烟台大学
1:烟台大学文经学院
xy string 必须 学院简称
bj string 158-2 必须 班级

以JSON格式返回结果。

系统级参数

所有接入点需要的参数。

参数名称 类型 说明
code string 1:正常
-1:SK错误
-2:参数错误

应用级参数

每个接入点自己的参数。

参数名称 类型 说明
kbName string 课程名称
kbTeacher string 课程老师
kbAddr string 课程教室
kbWeek string 课程周次
nf string 年份
bj string 班级

请求实例


PHP 为例的请求实例。

                    
$sk = '';
$url = "https://api.mayuko.cn/v2/ytukb/?sk=sk&xx=0&xy=经&bj=158-2";
echo get_file($url);
function get_file($url)
{
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HEADER, 0);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
    $data = curl_exec($curl);
    curl_close($curl);
    return $data;
}
                    
                

JAVA 为例的请求实例。

                    
public static void main(String path[]) throws Exception {
    URL u=new URL("https://api.mayuko.cn/v2/ytukb/?sk=sk&xx=0&xy=经&bj=158-2");
    InputStream in=u.openStream();
    ByteArrayOutputStream out=new ByteArrayOutputStream();
    try {
        byte buf[]=new byte[1024];
        int read = 0;
        while ((read = in.read(buf)) > 0) {
            out.write(buf, 0, read);
        }
    } finally {
        if (in != null) {
            in.close();
        }
    }
    byte b[]=out.toByteArray( );
    System.out.println(new String(b,"utf-8"));
}
                    
                

Python 为例的请求实例。

                    
import urllib.parse
import urllib.request

data={}
data['sk']=''
data['参数']=''
url_values=urllib.parse.urlencode(data)
url = 'https://api.mayuko.cn/v2/ytukb/?sk=sk&xx=0&xy=经&bj=158-2?'
full_url=url+url_values
data=urllib.request.urlopen(full_url).read()
z_data=data.decode('UTF-8')
print(z_data)
                    
                

JSON格式返回结果。

{
    "0": {
        "0": {
            "kbName": "大学英语写作(提高课)(541400013-01)",
            "kbTeacher": "石华卫",
            "kbAddr": "外院公共语音室19",
            "kbWeek": "1-17周上(1-2节)"
        },
        "1": {
            "kbName": "英汉互译理论与实践(提高课)(541400023-01)",
            "kbTeacher": "李艳丽",
            "kbAddr": "外院公共语音室12",
            "kbWeek": "1-17周上(1-2节)"
        }
    },
    "1": {
        "0": {
            "kbName": "概率论与数理统计(111010031-05)",
            "kbTeacher": "郝雪梅",
            "kbAddr": "五教401",
            "kbWeek": "1-17周上(1-2节)"
        }
    },
    "2": {
        "0": {
            "kbName": "企业战略管理(532011321-02)",
            "kbTeacher": "刘青",
            "kbAddr": "七教402",
            "kbWeek": "1,3,5,7,9,11,13,15,17周上(1-2节)"
        }
    },
    "3": {
        "0": {
            "kbName": "大学英语写作(提高课)(541400013-08)",
            "kbTeacher": "李馨",
            "kbAddr": "外院公共语音室22",
            "kbWeek": "1-17周上(1-2节)"
        },
        "1": {
            "kbName": "英汉互译理论与实践(提高课)(541400023-08)",
            "kbTeacher": "杨震寰",
            "kbAddr": "外院公共语音室5",
            "kbWeek": "1-17周上(1-2节)"
        }
    },
    "4": {
        "0": {
            "kbName": "概率论与数理统计(111010031-05)",
            "kbTeacher": "郝雪梅",
            "kbAddr": "五教401",
            "kbWeek": "1-17周上(1-2节)"
        }
    },
    "5": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "6": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "7": {
        "0": {
            "kbName": "体育(1-4)(331410014-01)",
            "kbTeacher": "才绍文",
            "kbAddr": "体育课运动场",
            "kbWeek": "1-17周上(3-4节)"
        },
        "1": {
            "kbName": "体育(1-4)(331410014-02)",
            "kbTeacher": "侯凯",
            "kbAddr": "体育课运动场",
            "kbWeek": "1-17周上(3-4节)"
        }
    },
    "8": {
        "0": {
            "kbName": "财务管理(072010071-01)",
            "kbTeacher": "高明玲",
            "kbAddr": "五教208",
            "kbWeek": "1-18周(3-4节)"
        }
    },
    "9": {
        "0": {
            "kbName": "马克思主义基本原理(511000021-05)",
            "kbTeacher": "吴绍金",
            "kbAddr": "七教504",
            "kbWeek": "1-17周上(3-4节)"
        }
    },
    "10": {
        "0": {
            "kbName": "企业战略管理(532011321-02)",
            "kbTeacher": "刘青",
            "kbAddr": "综合楼421",
            "kbWeek": "1-18周(3-4节)"
        }
    },
    "11": {
        "0": {
            "kbName": "物流管理(532011311-01)",
            "kbTeacher": "赵忠",
            "kbAddr": "五教405",
            "kbWeek": "1-18周(3-4节)"
        }
    },
    "12": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "13": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "14": {
        "0": {
            "kbName": "市场营销学(072014011-01)",
            "kbTeacher": "刘丽英",
            "kbAddr": "综合楼521",
            "kbWeek": "1,3,5,7,9,11,13,15,17周上(5-6节)"
        },
        "1": {
            "kbName": "统计学原理(072010051-04)",
            "kbTeacher": "王少瑾",
            "kbAddr": "综合楼119",
            "kbWeek": "2,4,6,8,10,12,14,16,18周上(5-6节)"
        }
    },
    "15": {
        "0": {
            "kbName": "职业素质与英语训练4(532433306-04)",
            "kbTeacher": "薛亚男",
            "kbAddr": "综合楼313",
            "kbWeek": "1-17周上(5-6节)"
        }
    },
    "16": {
        "0": {
            "kbName": "统计学原理(072010051-04)",
            "kbTeacher": "王少瑾",
            "kbAddr": "综合楼119",
            "kbWeek": "1-18周(5-6节)"
        }
    },
    "17": {
        "0": {
            "kbName": "市场营销学(072014011-01)",
            "kbTeacher": "刘丽英",
            "kbAddr": "综合楼521",
            "kbWeek": "1-18周(5-6节)"
        }
    },
    "18": {
        "0": {
            "kbName": "物流外包综合实训(1)(534011301-02)",
            "kbTeacher": "外请1",
            "kbAddr": "综合楼216",
            "kbWeek": "1-17周上(5-6节)"
        }
    },
    "19": {
        "0": {
            "kbName": "公益劳动(101000021-19)",
            "kbTeacher": "社区中心",
            "kbAddr": "社区中心劳动实践",
            "kbWeek": "1-8周上(5-8节)"
        }
    },
    "20": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "21": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "22": {
        "0": {
            "kbName": "物流设施与设备管理(533011481-01)",
            "kbTeacher": "马雪丽",
            "kbAddr": "综合楼320",
            "kbWeek": "11-18周上(7-8节)"
        }
    },
    "23": {
        "0": {
            "kbName": "形势与政策(101000011-30)",
            "kbTeacher": "侯典芹",
            "kbAddr": "综合楼408",
            "kbWeek": "11-14周上(7-8节)"
        }
    },
    "24": {
        "0": {
            "kbName": "物流设施与设备管理(533011481-01)",
            "kbTeacher": "马雪丽",
            "kbAddr": "综合楼107",
            "kbWeek": "11-18周上(7-8节)"
        }
    },
    "25": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "26": {
        "0": {
            "kbName": "公益劳动(101000021-19)",
            "kbTeacher": "社区中心",
            "kbAddr": "社区中心劳动实践",
            "kbWeek": "1-8周上(5-8节)"
        }
    },
    "27": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "28": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "29": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "30": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "31": {
        "0": {
            "kbName": "物流管理上机(532011311j-01)",
            "kbTeacher": "赵忠",
            "kbAddr": "实验室24",
            "kbWeek": "2-18周上(9-10节)"
        }
    },
    "32": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "33": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "34": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "35": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "36": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "37": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "38": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "39": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "40": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "41": {
        "0": {
            "kbName": "",
            "kbTeacher": "",
            "kbAddr": "",
            "kbWeek": ""
        }
    },
    "nf": "2016-2017学年春(两学期)  班级课表",
    "bj": "经158-2"
}