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.
83 lines
2.3 KiB
83 lines
2.3 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 Lesson from '../model/Lesson';
|
|
|
|
/**
|
|
* Timetable service.
|
|
* @module api/TimetableApi
|
|
* @version 1.0.0
|
|
*/
|
|
export default class TimetableApi {
|
|
|
|
/**
|
|
* Constructs a new TimetableApi.
|
|
* @alias module:api/TimetableApi
|
|
* @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 getTimetable operation.
|
|
* @callback module:api/TimetableApi~getTimetableCallback
|
|
* @param {String} error Error message, if any.
|
|
* @param {Array.<module:model/Lesson>} data The data returned by the service call.
|
|
* @param {String} response The complete HTTP response.
|
|
*/
|
|
|
|
/**
|
|
* Returns course's timetable
|
|
* @param {String} course
|
|
* @param {module:api/TimetableApi~getTimetableCallback} callback The callback function, accepting three arguments: error, data, response
|
|
* data is of type: {@link Array.<module:model/Lesson>}
|
|
*/
|
|
getTimetable(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 getTimetable");
|
|
}
|
|
|
|
|
|
let pathParams = {
|
|
'course': course
|
|
};
|
|
let queryParams = {
|
|
};
|
|
let headerParams = {
|
|
};
|
|
let formParams = {
|
|
};
|
|
|
|
let authNames = ['passwordAuth'];
|
|
let contentTypes = [];
|
|
let accepts = ['application/json'];
|
|
let returnType = [Lesson];
|
|
|
|
return this.apiClient.callApi(
|
|
'/course/{course}/timetable', 'GET',
|
|
pathParams, queryParams, headerParams, formParams, postBody,
|
|
authNames, contentTypes, accepts, returnType, callback
|
|
);
|
|
}
|
|
|
|
|
|
}
|
|
|