API Documents

同步教室也有提供 API 方便跟其它系統整合,主要功能有:

  • 開啟同步教室(create meetings)

  • 加入同步教室(join meetings)

  • 結束議程(end meetings)

  • 取得同步教室錄影(get recordings for past meetings)

https://sites.skyap.net/bbb22/home/api/create/www

API

d

  • join - configToken can now reference a file in /var/bigbluebutton/configs, such as myconfig.xml.

  • create - Added three parameters: moderatorOnlyMessage to display message only visible to moderators and autoStartRecording/allowStartStopRecording to provide finer control over recordings.

  • getMeetings - Added fields on the returned XML

  • getMeetingInfo - Added fields on the returned XML and deprecated parameters

  • getRecordings - Added meta parameter and state parameter to filter returned results

  • create - Added fields on the returned XML

  • getMeetings - Added fields on the returned XML

  • getMeetingInfo - Added fields on the returned XML

  • getRecordings - Returns an XML block with thumbnails from the slides as well as a <participants>N</participants> element with number of participants who attend the meeting.

  • updateRecordings - Meta parameters can be edited

  • create - Added bannerText, bannerColor, logo, copyright, and muteOnStart.

  • getMeetings - Now returns all the fields in getMeetingInfo.

  • getMeetingInfo - Added <client> field to return client type (FLASH, or HTML5).

  • create - Added bannerText, bannerColor, logo, copyright, and muteOnStart.

  • getMeetings - Now returns all the fields in getMeetingInfo.

  • getMeetingInfo - Added <client> field to return client type (FLASH, or HTML5).

  • getRecordingTextTracks - Get a list of the caption/subtitle files currently available for a recording.

  • putRecordingTextTrack - Upload a caption or subtitle file to add it to the recording. If there is any existing track with the same values for kind and lang, it will be replaced.

d

如果要 call 同步教室的 API 請先準備好 Server 網址及 Token. 分別像是這樣的:

Server: https://lingo.moodle.com.tw/lingo

Token: 350fcFlUWp5lJAkWylZfeiCikuTocAHWxzIrh6xFtn8

再來就是每個 Method 需要的參數了

meetingID: 會議室的ID

recordID: 錄影檔的ID

name: 議程的名稱(課程名稱)

fullname: 議程的全名

attendeePW: 進入會議室的密碼(如果老師有設定的話)

moderatorPW: 成為會議主持人的密碼(一樣是有指定才有)

welcome: 歡迎訊息(出現在聊天室上方), 可以有樣板, 如: <br>Welcome to <b>%%CONFNAME%%</b>!

...

Usage:

以下從最簡單/最常用的 Query String 的方式說明。

假設您要開1間同步教室,名稱為: IR培訓營; 教室ID代入: conf2020 (識別用); 同學的密碼: modtw2020; 老師的密碼: clickap

就可以組成以下的 [parameters]:

createname=IR培訓營&meetingID=conf2020&attendeePW=modtw2020&moderatorPW=clickap

同步教室伺服器的 Token: 350fcFlUWp5lJAkWylZfeiCikuTocAHWxzIrh6xFtn8

把 token 作 SHA-1 雜湊後: a158e97bcfb67eee59faa04d39b6d8794af43214

checksum=a158e97bcfb67eee59faa04d39b6d8794af43214

把 parameters 、 checksum 加入 query string 就像:

https://你的同步教室.com/lingo/api/create?[parameters]&checksum=[checksum]

SHA-1 雜湊

因為呼叫同步教室需要用到 SHA-1 雜湊,所以我們把常用語言的 sha1 方法整理出來:

  • Java
    您可以使用
    org.apache.commons.codec.digest.DigestUtils and call DigestUtils.shaHex(string + sharedSecret)
    詳見:
    Apache commons

PS:

您必須在每一次呼叫時都要做 SHA-1 雜湊。