# somtoday.js

> A JavaScript library for the SOMtoday REST API.

Latest version **1.1.1** (published 2025-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install somtoday.js
pnpm add somtoday.js
yarn add somtoday.js
bun add somtoday.js
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2025-02-03 |
| First published | 2020-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 276 KB |
| Known vulnerabilities | 0 (+26 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Eli Saado & Contributors |
| Maintainers | elisaado |

## Links

- npm: https://www.npmjs.com/package/somtoday.js
- Repository: https://github.com/elisaado/SOMtoday.js
- Homepage: https://github.com/elisaado/SOMtoday.js#readme
- Issues: https://github.com/elisaado/SOMtoday.js/issues
- npm.io page: https://npm.io/package/somtoday.js

## Dependencies (6)

- [fs](https://npm.io/package/fs.md) ^0.0.1-security
- [qs](https://npm.io/package/qs.md) ^6.9.3
- [axios](https://npm.io/package/axios.md) ^0.28.0
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [fuse.js](https://npm.io/package/fuse.js.md) ^5.1.0
- [@discordjs/collection](https://npm.io/package/@discordjs/collection.md) ^0.1.6

## Recent versions

- 1.1.1 (latest) — 2025-02-03
- 1.1.0 — 2025-02-03
- 1.0.4 — 2023-09-05
- 1.0.3 — 2023-09-05
- 1.0.2 — 2023-09-05
- 1.0.1 — 2022-02-05
- 1.0.0 — 2022-02-05
- 0.2.2 — 2021-05-12
- 0.2.1 — 2021-05-12
- 0.2.0 — 2021-05-06
- 0.1.0 — 2020-06-26

## README

# SOMtoday.js

A JavaScript library for the SOMtoday REST API.

This project uses [the somtoday api docs](https://github.com/elisaado/somtoday-api-docs).
If you need any help with this project feel free to join our discord!
[![Discord Chat](https://img.shields.io/discord/789249810032361502.svg)](https://discord.gg/yE3e3erCut)

## 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:

```ts
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:

```js
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();
```

---
_Source: https://npm.io/package/somtoday.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
