reddy-api-srm 1.0.1 → 1.0.3
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/dist/utils/dynamicUrl.js +6 -16
- package/package.json +2 -2
package/dist/utils/dynamicUrl.js
CHANGED
|
@@ -9,12 +9,14 @@ async function calendarDynamicUrl() {
|
|
|
9
9
|
let academicYearString;
|
|
10
10
|
let semesterType;
|
|
11
11
|
if (currentMonth >= 1 && currentMonth <= 6) {
|
|
12
|
+
// Jan-June: EVEN semester of previous academic year
|
|
12
13
|
semesterType = "EVEN";
|
|
13
14
|
academicYearString = `${currentYear - 1}_${currentYear
|
|
14
15
|
.toString()
|
|
15
16
|
.slice(-2)}`;
|
|
16
17
|
}
|
|
17
18
|
else {
|
|
19
|
+
// July-Dec: ODD semester of current academic year
|
|
18
20
|
semesterType = "ODD";
|
|
19
21
|
academicYearString = `${currentYear}_${(currentYear + 1)
|
|
20
22
|
.toString()
|
|
@@ -25,21 +27,9 @@ async function calendarDynamicUrl() {
|
|
|
25
27
|
return dynamicUrl;
|
|
26
28
|
}
|
|
27
29
|
async function courseDynamicUrl() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// if (currentMonth >= 1 && currentMonth <= 6) {
|
|
33
|
-
const academicYearString = `${currentYear - 2}_${(currentYear - 1)
|
|
34
|
-
.toString()
|
|
35
|
-
.slice(-2)}`;
|
|
36
|
-
// } else {
|
|
37
|
-
// academicYearString = `${currentYear - 1}_${currentYear
|
|
38
|
-
// .toString()
|
|
39
|
-
// .slice(-2)}`;
|
|
40
|
-
// }
|
|
41
|
-
const baseUrl = "https://academia.srmist.edu.in/srm_university/academia-academic-services/page/My_Time_Table_";
|
|
42
|
-
const dynamicUrl = `${baseUrl}${academicYearString}`;
|
|
43
|
-
return dynamicUrl;
|
|
30
|
+
// My_Time_Table_2023_24 serves the current semester timetable data
|
|
31
|
+
// Note: Despite the name, this endpoint returns the current academic year data
|
|
32
|
+
const baseUrl = "https://academia.srmist.edu.in/srm_university/academia-academic-services/page/My_Time_Table_2023_24";
|
|
33
|
+
return baseUrl;
|
|
44
34
|
}
|
|
45
35
|
//# sourceMappingURL=dynamicUrl.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reddy-api-srm",
|
|
3
3
|
"description": "SRMIST KTR Academia portal",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"axios": "^1.11.0",
|
|
52
52
|
"cheerio": "^1.1.2"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|