1.8.3 • Published 1 year ago
code-university v1.8.3
code-university
Functionality and data related to CODE University of Applied Sciences (https://code.berlin), specifically the CODE Learning Platform (https://app.code.berlin).
Tested with
- CODE Learning Platform v2.14.5
- NodeJs v20.5.1
- NPM v9.8.0
Install
Install the package:
npm install code-universityExamples
// basic usage
import { LearningPlatformClient } from 'code-university';
async function main() {
const learningPlatform = await LearningPlatformClient.fromRefreshToken(
process.env.LEARNING_PLATFORM_REFRESH_TOKEN
);
const settings = await learningPlatform.getOwnSettings();
console.log(settings);
}
main();Retrieving a refresh token from the CODE Learning Platform
- Open https://app.code.berlin
- Open the browser devtools using
Cmd + Shift + Ion mac orCtrl + Shift + Ion windows - Click on the
Applicationtab - On the left side of the
Applicationtab, clickCookies>https://app.code.berlin - Double-click the
Valuefield of thecidcookie, and copy it to your clipboard.
