import BaseCourseAPI from './Base';

export default class VirtualClassroomsAPI extends BaseCourseAPI {
  /**
   * Get Braincert Virtual Classroom Access Link
   *
   * @param {number} virtualClassroomId
   * @return {Promise}
   * success response: { link }
   * error response: { errors: String } - An error string will be returned upon validation error.
   */
  accessLink(virtualClassroomId) {
    return this.getClient().get(
      `${this._getUrlPrefix()}/${virtualClassroomId}/access_link`,
      this.getCourseId(),
      virtualClassroomId,
      { format: 'json' },
    );
  }

  /**
   * Get Braincert Virtual Classroom list of recorded videos
   *
   * @param {number} virtualClassroomId
   * @return {Promise}
   * response: [video_info_hash]
   */
  recordedVideos(virtualClassroomId) {
    return this.getClient().get(
      `${this._getUrlPrefix()}/${virtualClassroomId}/recorded_videos`,
      this.getCourseId(),
      virtualClassroomId,
      { format: 'json' },
    );
  }

  /**
   * Get BrainCert Virtual Classroom recorded video access link
   *
   * @param recordId BrainCert Record ID
   * @return {Promise}
   * success response: { link }
   * error response: { errors: String } - An error string will be returned upon error.
   */
  recordedVideoLink(recordId) {
    return this.getClient().get(
      `${this._getUrlPrefix()}/recorded_video_link/${recordId}`,
      this.getCourseId(),
      { format: 'json' },
    );
  }

  _getUrlPrefix() {
    return `/courses/${this.getCourseId()}/virtual_classrooms`;
  }
}

@@ -494,93 +494,15 @@
 k%60,%0A
-      this.getCourseId(),%0A      virtualClassroomId,%0A      %7B format: 'json' %7D,%0A
     );%0A
+
   %7D%0A
@@ -823,86 +823,8 @@
 s%60,%0A
-      this.getCourseId(),%0A      virtualClassroomId,%0A      %7B format: 'json' %7D,%0A
     
@@ -1152,32 +1152,32 @@
 etClient().get(%0A
+
       %60$%7Bthis._g
@@ -1229,60 +1229,8 @@
 %7D%60,%0A
-      this.getCourseId(),%0A      %7B format: 'json' %7D,%0A
     

Fix incorrect axios get request arguments