fix(core): update

This commit is contained in:
2020-06-21 16:27:02 +00:00
parent 40704efaa4
commit 057cca6f0e
4 changed files with 69 additions and 23 deletions

View File

@@ -1,5 +1,27 @@
import * as plugins from './ora.plugins';
import { OraProject } from './ora.classes.project';
export class OraList {
// ======
// STATIC
// ======
public static async getAllLists(oraProjectRef: OraProject) {
const response = await oraProjectRef.oraOrganizationRef.oraRef.request(`/projects/${oraProjectRef.id}/lists`, 'GET');
const oraLists: OraList[] = [];
for (const dataObject of response.data) {
oraLists.push(new OraList(oraProjectRef, dataObject));
}
return oraLists;
}
// ========
// INSTANCE
// ========
public oraProjectObjectRef: OraProject;
constructor(oraProjectRefArg: OraProject, creationObjectArg) {
this.oraProjectObjectRef = oraProjectRefArg;
Object.assign(this, creationObjectArg);
}
}