Create class(multiple)
Create class sessions (multiple), batch create class sessions, need 'SID, safekey, timeStamp, class ID, class name, class time, teacher account, teacher name, cloud disk directory ID, number of student attendance, class recording, live broadcast, playback, unique identification, class introduction, teacher UID, teaching assistant UID', etc.Returns the class ID created, the class name, the error code for creating the class, and the error description. note: currently, only 1v1 or 1v6 hd and full hd are supported, so the number of people who choose hd can only choose 1 or 6. Users can pass custom fields, and the interface returns the parameters as-is. No pass, no return.After the unique identity is passed in by the mechanism, the interface verifies whether there is such a unique identity in all created classes under the mechanism, and if so, returns the class ID that was successfully created before.If not, execute normally.
Note:
- if class recording is set for class (live streaming is not set), more_data returns the address of the live streaming player for class, and the pull stream address is empty;
- If a class is set to record and broadcast, three pull stream addresses (RTMP, HLS and FLV) will be bound to the class, and more_data will return the live player address and pull stream address of the class (these three addresses will still exist and be bound to the class regardless of whether the live broadcast of the class is cancelled or not).
- When the session is not recorded, the session live player address and pull stream address in more_data are empty.
The following comparison is for reference only.
RTMP | HLS | FLV(HTTP-FLV) | |
---|---|---|---|
The full name | Real Time Message Protocol | HTTP Liveing Streaming | RTMP over HTTP |
agreement | Long TCP connection | Short HTTP connection | Long HTTP connection |
The principle of | Data at each moment is forwarded as soon as it is received | Collect data for a period of time, generate ts slice files (three slices), and update the m3u8 index | With RTMP, using HTTP protocol (port 80) |
Time delay | 1-3s | 5-20s(depending on the slice) | 1-3s |
Web support | Plug-ins are required in H5 | Support the H5 | Plug-ins are required in H5 |
other | Cross-platform support is poor, need Flash technical support | Playback needs multiple requests, high quality requirements for the network | Need Flash technical support, do not support multi-audio stream, multi-video stream, not easy to seek (i.e. drag progress bar) |
In the live player page of the returned lesson, we implanted the chat room function.In order to facilitate you to collect the information of potential customers, all users need to fill in their mobile phone Numbers before they can chat, as shown in the figure below.Of course, in order to make it more convenient for you to use this function, we provide all students in your institution without logging in, please refer to the following
The chat room in the live player is exempted from secondary login
- After you get the player link through this interface
- Example:
https://api.eeo.cn/live.php?lessonKey=1ca102d29e61175f
- you need
account、nickname、checkCode
Joining together inhttps://api.eeo.cn/live_partner.php?lessonKey=00d1c98a91c52568
After the address. Note: this free secondary login address is not the same address as the live player address
- Example:
- The specific parameters and rules are as follows
- Specific parameters are
secret, lessonKey, account, nickname, checkCode
- secret is SECRET,Available at the eeo.cn API for docking keysl
- lessonKey can be obtained from the broadcast address
- account is student account,nickname is student nickname
- checkCode = md5(secret+lessonKey+account+nickname)
- Specific parameters are
- URL Stitching sample
https://api.eeo.cn/live_partner.php?lessonKey=00d1c98a91c52568&account=13700000000&nickname=classin&checkCode=d8c57caf088529b4ddd15b0f694d847b
URL
https://api.eeo.cn/partner/api/course.api.php?action=addCourseClassMultiple
HTTP Request Methods
- POST
Coding format
- UTF-8
Request data
key | Required | More Restrictions | Instructions | Description |
---|---|---|---|---|
SID | Yes | Null | School ID | It is available through the eeo.cn application |
safeKey | Yes | Fixed 32-bit all lowercase characters | School authentication security key | safeKey=MD5(SECRET+timeStamp) |
timeStamp | Yes | Null | Imestamp used by safeKey | Unix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970 |
courseId | Yes | Null | Course ID | No |
classJson | Yes | Null | Class information array | No |
└ Class information | Yes | Null | Lesson information to create | No |
└ className | Yes | 1-50 words, no distinction between Chinese and English, more than 50 words will automatically cut into 50 words | Class name | No |
└ beginTime | Yes | The course must start within 3 years | Class time | No |
└ endTime | Yes | Null | Class is over time | No |
└ teacherUid | Yes | Null | Teacher's UID | The user UID returned by the user register interface |
└ folderId | Null | The default is folderId for the course | Cloud disk directory ID | There is no |
└ seatNum | Null | The default is 6, and the maximum upper limit is adjusted to 12 | Students count on the computer | There is no |
└ record | Null | The default is 0, and all non-1 Numbers are treated as 0 | Recording (0 closed, 1 open) | If you need live broadcast or playback, you must choose to record the lesson, otherwise you cannot open live broadcast or playback |
└ live | Null | The default is 0, and all non-1 Numbers are treated as 0 | Live broadcast (0 off, 1 on) | If you want to live, you must start recording |
└ replay | Null | The default is 0, and all non-1 Numbers are treated as 0 | Playback (0 off, 1 on) | If playback is required, recording must be enabled |
└ assistantUid | Null | You must be a teacher of your institution to be appointed a ta | Ta UID | Register the user UID returned by the user interface |
└ customColumn | Null | 1-50 characters, more than will automatically intercept to 50 words | User - defined identity | If it is not empty, it is returned as is; if it is empty, the field is not returned |
└ isAutoOnstage | Null | 0= auto, 1= not auto, default is 0, all non-1 Numbers are treated as 0 | Whether students enter the classroom automatically | No |
└ isHd | Null | 0= non-hd, 1= hd, 2= full hd, default is 0, all non-0 digits over 1 are treated as 0 | Whether the hd | Currently only 1V1 or 1V6 hd, full hd |
└ courseUniqueIdentity | Null | For example: 45s8d5a6asaa1ssf (1-32 bit characters, non-conforming value interface will return 100 errors) | A unique identifier | A unique identity can be passed by the school, and once this value is passed in, we will verify that the unique identity is present in all created classes under the school |
└ classIntroduce | Null | 0-1000 words, no distinction between Chinese and English, more than 1000 words will automatically cut into 1000 words. | Class introduction | No |
└ ...... | Null | No | Lesson information to create | No |
Response data
Key | Type | Sample value | meaning |
---|---|---|---|
data | array | [] | Returns an array of Data information |
└ data | number | 1369235 | Class ID added |
└ className | string | 测试课节-1 | Added class name |
└ customColumn | string | 123 | User - defined identity |
└ more_data | array | [] | Returns an array of Data information |
└ live_url | string | https://api.eeo.cn/live.php?lessonKey=0fdc12bc3558164d | Lesson live player address |
└ live_info | array | [] | Returns an array of Data information |
└ RTMP | string | "rtmp://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | Pull flow address |
└ HLS | string | "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.m3u8?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | Pull flow address |
└ FLV | string | "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.flv?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | Pull flow address |
└ data | number | 1369235 | Add class ID |
└ className | string | Test class-1 | Add the class name |
└ errno | number | 1 | Error code for this class |
└ error | string | "Normal execution" | Error list for this class |
error_info | object | Return message object | |
└ errno | number | 1 | Error code |
└ error | string | "Program normal execution" | Error list |
Sample
- HTTP request ```http POST /partner/api/course.api.php?action=addCourseClassMultiple HTTP/1.1 Host: www.eeo.cn Content-Type: application/x-www-form-urlencoded Cache-Control: no-cache
SID=2339736&safeKey=5458edceccc78c6698de624e94364285&timeStamp=1493026245&courseId=469383&classJson=[{"className":"Chinese Test-1","beginTime":1493026245,"endTime":1493036245,"teacherUid":"23692341090","teacherName":"Jeck","folderId":714013,"seatNum":4,"customColumn":123,"isAutoOnstage":0,"isHd":0,"courseUniqueIdentity":457354},{"className":"Chinses Test-2","beginTime":1493026245,"endTime":1493036245,"teacherUid":"23692341090","teacherName":"Mary","folderId":714013,"seatNum":6,"customColumn":124,"isAutoOnstage":0,"isHd":0,"courseUniqueIdentity":457354,"classIntroduce ":"ClassIn,真正的在线教室"}]
- Shell cURL analog request instruction
```bash
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
-d "SID=1234567" \
-d "safeKey=0f7781b3033527a8cc2b1abbf45a5fd2" \
-d "timeStamp=1484719085" \
-d "courseId=442447" \
-d 'classJson= \
[ \
{ \
"className":"测试课节-1", \
"beginTime":1493029525, \
"endTime":1493039525, \
"teacherUid":"1001001",\
"teacherName":"教师1",\
"seatNum":4,\
"record":1,\
"live":0,\
"replay":1,\
"assistantUid":"1001002",\
"isAutoOnstage":"0", \
"isHd":"0", \
"courseUniqueIdentity":123457 \
"classIntroduce":"ClassIn,真正的在线教室" \
},\
{\
"className":"测试课节-2",\
"beginTime":1493029525,\
"endTime":1493039525,\
"teacherUid":"1001002",\
"teacherName":"教师2",\
"seatNum":4,\
"record":1,\
"live":1,\
"replay":1,\
"assistantUid":"1001001",\
"isAutoOnstage":"0", \
"isHd":"0",\
"courseUniqueIdentity":1234575 \
"classIntroduce":"ClassIn,真正的在线教室" \
}\
]' \
"https://api.eeo.cn/partner/api/course.api.php?action=addCourseClassMultiple"
Response sample(The normal return json
packet example)
{
"data": [
{
"data": 23634,
"className": "测试课节-1",
"customColumn": "123",
"more_data": {
"live_url": "https://api.eeo.cn/live.php?lessonKey=0fdc12bc3558164d",
"live_info": {
"RTMP": "rtmp://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
"HLS": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.m3u8?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
"FLV": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.flv?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd"
}
},
"errno": 1,
"error": "程序正常执行"
},
{
"data": 23635,
"className": "测试课节-2",
"customColumn": "124",
"more_data": {
"live_url": "https://api.eeo.cn/live.php?lessonKey=0fdc12bc3558164d",
"live_info": {
"RTMP": "rtmp://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
"HLS": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.m3u8?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
"FLV": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.flv?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd"
}
},
"errno": 1,
"error": "程序正常执行"
}
],
"error_info": {
"errno": 1,
"error": "程序正常执行"
}
}
Error code instruction
Error code | Instruction |
---|---|
1 | Expression successful execution. |
100 | Expression parameter not all or error. |
102 | Expression dont have permissions(Security verification failed). |
104 | Expression operation failure(Unknown error). |
114 | Expression server exception. |
119 | Expression the end time must be late. |
120 | Expression at least one minute after class. |
133 | Indicates that it already exists (there is a unique identifier duplicate in the incoming classJson) | 136 | Expression this account is not a teacher of the institution. | 144 | Expression no such course information. | 147 | Expression no such course information. | 149 | Expression courses have been deleted. | 153 | Expression the course has expired. | 155 | Expression the data array must not be empty. | 160 | Expression there is no cloud disk directory under the organization. | 165 | Means that a lesson should not be less than 15 minutes and not more than 24 hours, | 172 | Expression the students in the course cannot be added to the teacher. | 173 | Expression the audit of the course cannot be added to the teacher. | 220 | Expression the client adds class failure | 259 | Expression the number of people on stage exceeded the maximum limit. | 268 | Expression the starting time of class festival must be within 3 years. | 280 | Expression Lesson section creates success,Error recording parameter setting,Recording class open the failure. | 281 | Expression Class creates success,Video service has problems,Recording class open the failure. | 318 | Expression the teaching assistant does not exist | 319 | Expression the students under the course cannot be added as teaching assistant | 320 | Expression the attend under the course cannot be added as teaching assistant | 322 | Expression Teachers cannot be added as teaching assistants | 324 | Expression the teacher's list of teachers in the class failed. | 326 | Expression the teacher's list of teaching assistant in the class failed. | 330 | Expression the teaching assistant account format is not correct. | 369 | Expression open class does not support this operation. | 387 | indicates that the teacher has been suspended. | 388 | Indicates that the ta has been discontinued. | 398 | Indicates that the data already exists (a unique identity already exists). | 400 | Indicates that the request data is not valid. | 800 | Means the teacher is out of use. | 804 | The ta is out of use. | 824 | Indicates that the session was added successfully, while the session introduction setting failed.