1.0.4 • Published 8 months ago

somtoday.js v1.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
8 months ago

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();
1.0.2

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.1

2 years ago

1.0.0

2 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.2.2

3 years ago

0.1.0

4 years ago