caccl-api
Version:
A class that defines a set of smart Canvas endpoints that actually behave how you'd expect them to.
28 lines (24 loc) • 718 B
text/typescript
// Import shared types
import APIStructure from '../types/API';
import InitPack from './types/InitPack';
import VisitEndpointFunc from './types/VisitEndpointFunc';
/**
* An endpoint category
* @author Gabe Abrams
*/
class EndpointCategory {
protected visitEndpoint: VisitEndpointFunc;
protected api: APIStructure;
protected defaultCourseId: number;
/**
* Initialize the endpoint category
* @author Gabe Abrams
* @param initPack package of info for initializing the endpoint category
*/
constructor(initPack: InitPack) {
this.visitEndpoint = initPack.visitEndpoint;
this.api = initPack.api;
this.defaultCourseId = initPack.defaultCourseId;
}
}
export default EndpointCategory;