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);
|
|
|
|
}
|
|
|
|
|
2021-05-05 15:37:19 -04:00
|
|
|
public joinMeetingWithGreenlightUrl(url: string, name: string): Promise<FE_BigBlueButtonJoin|ApiError> {
|
2020-07-23 17:10:27 -04:00
|
|
|
return this.authedGet<FE_BigBlueButtonJoin|ApiError>("/api/v1/dimension/bigbluebutton/join", {greenlightUrl: url, fullName: name}).toPromise();
|
|
|
|
}
|
2021-05-04 04:38:44 -04:00
|
|
|
|
2021-05-06 14:30:47 -04:00
|
|
|
public getJoinUrl(displayName: string, userId: string, avatarUrl: string, meetingId: string, meetingPassword: string): Promise<FE_BigBlueButtonCreateAndJoinMeeting|ApiError> {
|
|
|
|
return this.authedGet<FE_BigBlueButtonCreateAndJoinMeeting|ApiError>(
|
|
|
|
"/api/v1/dimension/bigbluebutton/getJoinUrl",
|
|
|
|
{displayName: displayName, userId: userId, avatarUrl: avatarUrl, meetingId: meetingId, meetingPassword: meetingPassword},
|
|
|
|
).toPromise();
|
2021-05-04 04:38:44 -04:00
|
|
|
}
|
|
|
|
|
2020-07-23 17:10:27 -04:00
|
|
|
}
|