2020-07-23 17:10:27 -04:00
|
|
|
import { Injectable } from "@angular/core";
|
|
|
|
import { AuthedApi } from "../authed-api";
|
2021-05-04 04:38:44 -04:00
|
|
|
import { FE_BigBlueButtonJoin, FE_BigBlueButtonCreateAndJoinMeeting } from "../../models/integration"
|
2020-07-23 17:10:27 -04:00
|
|
|
import { HttpClient } from "@angular/common/http";
|
|
|
|
import { ApiError } from "../../../../../src/api/ApiError";
|
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class BigBlueButtonApiService extends AuthedApi {
|
|
|
|
constructor(http: HttpClient) {
|
|
|
|
super(http);
|
|
|
|
}
|
|
|
|
|
|
|
|
public joinMeeting(url: string, name: string): Promise<FE_BigBlueButtonJoin|ApiError> {
|
|
|
|
return this.authedGet<FE_BigBlueButtonJoin|ApiError>("/api/v1/dimension/bigbluebutton/join", {greenlightUrl: url, fullName: name}).toPromise();
|
|
|
|
}
|
2021-05-04 04:38:44 -04:00
|
|
|
|
|
|
|
public createAndJoinMeeting(roomId: string): Promise<FE_BigBlueButtonCreateAndJoinMeeting|ApiError> {
|
|
|
|
return this.authedGet<FE_BigBlueButtonCreateAndJoinMeeting|ApiError>("/api/v1/dimension/bigbluebutton/join_meeting", {roomId: roomId}).toPromise();
|
|
|
|
}
|
|
|
|
|
2020-07-23 17:10:27 -04:00
|
|
|
}
|