You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
ReactOrganizer/api/ExaminationSchedulingApi.js

83 lines
2.4 KiB

/**
* Organizer
* Dies ist eine API, die es ermöglicht Daten zu Stunden-, Vertretungs-, oder Klausurplänen zu erhalten.
*
* OpenAPI spec version: 1.0.0
* Contact: info@jonasfranz.software
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
import ApiClient from "../ApiClient";
import Exam from '../model/Exam';
/**
* ExaminationScheduling service.
* @module api/ExaminationSchedulingApi
* @version 1.0.0
*/
export default class ExaminationSchedulingApi {
/**
* Constructs a new ExaminationSchedulingApi.
* @alias module:api/ExaminationSchedulingApi
* @class
* @param {module:ApiClient} apiClient Optional API client implementation to use,
* default to {@link module:ApiClient#instance} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Callback function to receive the result of the getExams operation.
* @callback module:api/ExaminationSchedulingApi~getExamsCallback
* @param {String} error Error message, if any.
* @param {Array.<module:model/Exam>} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Returns course&#39;s exams
* @param {String} course
* @param {module:api/ExaminationSchedulingApi~getExamsCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link Array.<module:model/Exam>}
*/
getExams(course, callback) {
let postBody = null;
// verify the required parameter 'course' is set
if (course === undefined || course === null) {
throw new Error("Missing the required parameter 'course' when calling getExams");
}
let pathParams = {
'course': course
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = ['passwordAuth'];
let contentTypes = [];
let accepts = ['application/json'];
let returnType = [Exam];
return this.apiClient.callApi(
'/course/{course}/exams', 'GET',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
}