code-university
v1.8.3
Published
Functionality and data related to CODE University of Applied Sciences (https://code.berlin), specifically the CODE Learning Platform (https://app.code.berlin).
Downloads
14
Maintainers
Readme
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-university
Examples
// 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 + I
on mac orCtrl + Shift + I
on windows - Click on the
Application
tab - On the left side of the
Application
tab, clickCookies
>https://app.code.berlin
- Double-click the
Value
field of thecid
cookie, and copy it to your clipboard.