@itutoring/itutoring_application_js_api 1.12.5 → 1.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/modules/LessonInventory.js +11 -6
- package/package.json +1 -1
|
@@ -16,10 +16,15 @@ class LessonInventory
|
|
|
16
16
|
static #GET_SUBJECT_NAME = "GetSubjectName";
|
|
17
17
|
static #SEARCH = "Search";
|
|
18
18
|
|
|
19
|
-
static async getAvailableSubjects()
|
|
19
|
+
static async getAvailableSubjects(category = 'ANY', max = -1, offset = 0, filter = [])
|
|
20
20
|
{
|
|
21
|
-
var subjects = await APIController.Get(this.#MODULE, this.#GET_AVAILABLE_SUBJECTS
|
|
22
|
-
|
|
21
|
+
var subjects = await APIController.Get(this.#MODULE, this.#GET_AVAILABLE_SUBJECTS, {
|
|
22
|
+
'category': category,
|
|
23
|
+
'max': max,
|
|
24
|
+
'offset': offset,
|
|
25
|
+
'filter': JSON.stringify(filter)
|
|
26
|
+
});
|
|
27
|
+
return subjects;
|
|
23
28
|
}
|
|
24
29
|
|
|
25
30
|
static async getSubject(id)
|
|
@@ -27,7 +32,7 @@ class LessonInventory
|
|
|
27
32
|
var subject = await APIController.Get(this.#MODULE, this.#GET_SUBJECT, {
|
|
28
33
|
'id': id
|
|
29
34
|
});
|
|
30
|
-
return
|
|
35
|
+
return subject;
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
static async getSubjectName(id)
|
|
@@ -35,7 +40,7 @@ class LessonInventory
|
|
|
35
40
|
var name = await APIController.Get(this.#MODULE, this.#GET_SUBJECT_NAME, {
|
|
36
41
|
'id': id
|
|
37
42
|
});
|
|
38
|
-
return
|
|
43
|
+
return name;
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
static async search(query)
|
|
@@ -43,7 +48,7 @@ class LessonInventory
|
|
|
43
48
|
var subjects = await APIController.Get(this.#MODULE, this.#SEARCH, {
|
|
44
49
|
'query': query
|
|
45
50
|
});
|
|
46
|
-
return
|
|
51
|
+
return subjects;
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
54
|
|