Skip to content

A JavaScript library for the SOMtoday REST API.

License

Notifications You must be signed in to change notification settings

FurriousFox/somtoday.js

 
 

Repository files navigation

SOMtoday.js

A JavaScript library for the SOMtoday REST API.

This project uses the somtoday api docs. If you need any help with this project feel free to join our discord! Discord Chat

Installation

Use either npm, or yarn to install the library to your project

npm i somtoday.js --save

yarn add somtoday.js

Usage

Typescript example:

import somtoday from "somtoday.js";
async function main() {
  const org = await somtoday.searchOrganisation({
    name: "SCHOOL NAME HERE",
  });
  if (!org) throw new Error("School not found");
  const user = await org.authenticate({
    username: "SOMTODAY USERNAME",
    password: "SOMTODAY PASSWORD",
  });
  const students = await user.getStudents();
  console.log(students);
  console.log(":D");
}
main();

Javascript example:

const somtoday = require("../somtoday.js").default;
async function main() {
  const org = await somtoday.searchOrganisation({
    name: "SCHOOL NAME HERE",
  });
  if (!org) throw new Error("School not found");
  const user = await org.authenticate({
    username: "SOMTODAY USERNAME",
    password: "SOMTODAY PASSWORD",
  });
  const students = await user.getStudents();
  console.log(students);
  console.log(":)");
}
main();

About

A JavaScript library for the SOMtoday REST API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%