Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

classcharts-api

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

classcharts-api - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

dist/utils.d.ts

2

dist/baseClient.js

@@ -127,2 +127,4 @@ "use strict";

options?.toDate && params.append("to", String(options?.toDate));
options?.from && params.append("from", String(options?.from));
options?.to && params.append("to", String(options?.to));
const data = await this.makeAuthedRequest(this.API_BASE + "/homeworks/" + this.studentId + "?" + params.toString(), {

@@ -129,0 +131,0 @@ method: "GET",

15

dist/parentClient.js

@@ -6,2 +6,3 @@ "use strict";

const consts_1 = require("./consts");
const utils_1 = require("./utils");
/**

@@ -47,12 +48,6 @@ * The base client

throw new Error("Unauthenticated: Classcharts returned an error");
const cookies = request.headers["set-cookie"];
for (let i = 0; i < cookies.length; i++) {
cookies[i] = cookies[i].substring(0, cookies[i].indexOf(";"));
}
this.authCookies = cookies;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let sessionID = decodeURI(cookies[1])
.replace(/%3A/g, ":")
.replace(/%2C/g, ",");
sessionID = JSON.parse(sessionID.substring(sessionID.indexOf("{"), sessionID.length));
const cookies = String(request.headers["set-cookie"]);
this.authCookies = cookies.split(";");
const sessionCookies = (0, utils_1.parseCookies)(cookies);
const sessionID = JSON.parse(String(sessionCookies["parent_session_credentials"]));
this.sessionId = sessionID.session_id;

@@ -59,0 +54,0 @@ this.pupils = await this.getPupils();

@@ -6,2 +6,3 @@ "use strict";

const baseClient_1 = require("./baseClient");
const utils_1 = require("./utils");
/**

@@ -47,12 +48,6 @@ * The base client

throw new Error("Unauthenticated: Classcharts returned an error");
const cookies = request.headers["set-cookie"];
for (let i = 0; i < cookies.length; i++) {
cookies[i] = cookies[i].substring(0, cookies[i].indexOf(";"));
}
this.authCookies = cookies;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let sessionID = decodeURI(cookies[1])
.replace(/%3A/g, ":")
.replace(/%2C/g, ",");
sessionID = JSON.parse(sessionID.substring(sessionID.indexOf("{"), sessionID.length));
const cookies = String(request.headers["set-cookie"]);
this.authCookies = cookies.split(";");
const sessionCookies = (0, utils_1.parseCookies)(cookies);
const sessionID = JSON.parse(String(sessionCookies["student_session_credentials"]));
this.sessionId = sessionID.session_id;

@@ -59,0 +54,0 @@ const user = await this.getStudentInfo();

@@ -111,9 +111,17 @@ export interface Student {

/**
* From date, in format YYYY-MM-DD
* @deprecated Use "from" instead
*/
fromDate?: string;
/**
* @deprecated Use "to" instead
*/
toDate?: string;
/**
* From date, in format YYYY-MM-DD
*/
from?: string;
/**
* To date, in format YYYY-MM-DD
*/
toDate?: string;
to?: string;
}

@@ -120,0 +128,0 @@ export interface ValidatedHomeworkAttachment {

{
"name": "classcharts-api",
"version": "1.5.1",
"version": "1.5.2",
"description": "A javascript wrapper for getting information from the Classcharts API",

@@ -12,7 +12,7 @@ "keywords": [

"bugs": {
"url": "https://github.com/classchartsapi/js/issues"
"url": "https://github.com/classchartsapi/classcharts-api-js/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/classchartsapi/js.git"
"url": "https://github.com/classchartsapi/classcharts-api-js.git"
},

@@ -19,0 +19,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc