<commit_before># Zermelo Library for Node.JS

### Disclaimer: this project is created by a third party and not associated with Zermelo Software BV.

[![npm](https://img.shields.io/npm/v/zermelo.svg?style=flat-square)](https://www.npmjs.com/package/zermelo)
[![npm](https://img.shields.io/npm/l/zermelo.svg?style=flat-square)](https://github.com/mvegter/node-zermelo/blob/master/LICENSE)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/cc95bbd165834373ab34938416d03c33?style=flat-square)](https://www.codacy.com/app/mvegter/node-zermelo?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=mvegter/node-zermelo&amp;utm_campaign=Badge_Grade)
[![Build Status](https://travis-ci.org/mvegter/node-zermelo.svg?branch=master&style=flat-square)](https://travis-ci.org/mvegter/node-zermelo)
[![Coverage Status](https://coveralls.io/repos/github/mvegter/node-zermelo/badge.svg?branch=master)](https://coveralls.io/github/mvegter/node-zermelo?branch=master&style=)
[![Known Vulnerabilities](https://snyk.io/test/github/mvegter/node-zermelo/badge.svg?style=flat-square)](https://snyk.io/test/github/mvegter/node-zermelo)
[![GitHub issues](https://img.shields.io/github/issues/mvegter/node-zermelo.svg?style=flat-square)](https://github.com/mvegter/node-zermelo/issues)

# Contents
- [Installation](#installation-)
- [Usage](#usage-)
- [Methods](#methods-)
- [Events](#events-)

## Installation [^](#contents)
```
  npm install zermelo
```

## Usage [^](#contents)

```javascript
const ZermeloSchedule = require('zermelo');
const Zermelo         = new ZermeloSchedule();

Zermelo.logOn({
  'school'    : '', 
  'username'  : '',
  'password'  : ''
});

  or

Zermelo.logOn({
  'school'    : '', 
  'authCode'  : ''
});
```

## Methods [^](#contents)
### logOn
- `school` - (required) 
- `username` - (optional)
- `password` - (optional)
- `authCode` - (optional)

Note: Either a Authorization Code or Username / Password combination is required

### getAnnouncements
- `boolean` - Only retrieve the announcements that should be shown to users (Suggested: true)
- `callback` - CAlled when succesfully received announcements or an error occurs
  - `err` - An `Error` object on failure, or `null` on success
  - `res` - An JSON object containing any announcements

### getSchedule
- `start` - UTC Unix time of the start of this appointment. This is the first second this appointment is taking place.
- `end` - UTC Unix time of the end of this appointment. This is the first second where this appointment is no longer taking place.
- `callback` - CAlled when succesfully received announcements or an error occurs
  - `err` - An `Error` object on failure, or `null` on success
  - `res` - An JSON object containing any appointments

### getTeacher
- `start` - UTC Unix time of the start of this appointment. This is the first second this appointment is taking place.
- `end` - UTC Unix time of the end of this appointment. This is the first second where this appointment is no longer taking place.
- `teacher` - The code of the teacher
- `callback` - CAlled when succesfully received announcements or an error occurs
  - `err` - An `Error` object on failure, or `null` on success
  - `res` - An JSON object containing any appointments

### getClassroom
- `start` - UTC Unix time of the start of this appointment. This is the first second this appointment is taking place.
- `end` - UTC Unix time of the end of this appointment. This is the first second where this appointment is no longer taking place.
- `location` - The code of the location
- `callback` - CAlled when succesfully received announcements or an error occurs
  - `err` - An `Error` object on failure, or `null` on success
  - `res` - An JSON object containing any appointments

### getSubject
- `start` - UTC Unix time of the start of this appointment. This is the first second this appointment is taking place.
- `end` - UTC Unix time of the end of this appointment. This is the first second where this appointment is no longer taking place.
- `subject` - The code of the subject
- `callback` - CAlled when succesfully received announcements or an error occurs
  - `err` - An `Error` object on failure, or `null` on success
  - `res` - An JSON object containing any appointments
  
### getGroup
- `start` - UTC Unix time of the start of this appointment. This is the first second this appointment is taking place.
- `end` - UTC Unix time of the end of this appointment. This is the first second where this appointment is no longer taking place.
- `subject` - The code of the group
- `callback` - CAlled when succesfully received announcements or an error occurs
  - `err` - An `Error` object on failure, or `null` on success
  - `res` - An JSON object containing any appointments
  
## Events [^](#contents)
### loggedOn
Emitted when you're successfully logged into Zermelo.

### error
- `err` - An `Error` object

Emitted when an error occurs during logon. If this event isn't handled, the program will crash.<commit_msg>Temp Update Readme<commit_after># Zermelo Library for Node.JS

### Disclaimer: this project is created by a third party and not associated with Zermelo Software BV.

[![npm](https://img.shields.io/npm/v/zermelo.svg?style=flat-square)](https://www.npmjs.com/package/zermelo)
[![npm](https://img.shields.io/npm/l/zermelo.svg?style=flat-square)](https://github.com/mvegter/node-zermelo/blob/master/LICENSE)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/cc95bbd165834373ab34938416d03c33?style=flat-square)](https://www.codacy.com/app/mvegter/node-zermelo?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=mvegter/node-zermelo&amp;utm_campaign=Badge_Grade)
[![Build Status](https://travis-ci.org/mvegter/node-zermelo.svg?branch=master&style=flat-square)](https://travis-ci.org/mvegter/node-zermelo)
[![Coverage Status](https://coveralls.io/repos/github/mvegter/node-zermelo/badge.svg?branch=master)](https://coveralls.io/github/mvegter/node-zermelo?branch=master&style=)
[![Known Vulnerabilities](https://snyk.io/test/github/mvegter/node-zermelo/badge.svg?style=flat-square)](https://snyk.io/test/github/mvegter/node-zermelo)
[![GitHub issues](https://img.shields.io/github/issues/mvegter/node-zermelo.svg?style=flat-square)](https://github.com/mvegter/node-zermelo/issues)

# Contents
- [Installation](#installation-)
- [Usage](#usage-)
- [Methods](#methods-)
- [Events](#events-)

## Installation [^](#contents)
```
  npm install zermelo
```

## Usage [^](#contents)

```javascript
const ZermeloSchedule = require('zermelo');
const Zermelo         = new ZermeloSchedule();

Zermelo.logOn({
  'school'    : '', 
  'username'  : '',
  'password'  : ''
});

  or

Zermelo.logOn({
  'school'    : '', 
  'authCode'  : ''
});
```

## Methods [^](#contents)
### logOn
- `school` - (required) 
- `username` - (optional)
- `password` - (optional)
- `authCode` - (optional)

Note: Either a Authorization Code or Username / Password combination is required

### getAnnouncements
- `boolean` - Only retrieve the announcements that should be shown to users (Suggested: true)
- `callback` - CAlled when succesfully received announcements or an error occurs
  - `err` - An `Error` object on failure, or `null` on success
  - `res` - An JSON object containing any announcements

### getSchedule
- `start` - UTC Unix time of the start of this appointment. This is the first second this appointment is taking place.
- `end` - UTC Unix time of the end of this appointment. This is the first second where this appointment is no longer taking place.
- `callback` - CAlled when succesfully received announcements or an error occurs
  - `err` - An `Error` object on failure, or `null` on success
  - `res` - An JSON object
    - `status` - If there was no error, than this should be 200
    - `message` - Unknown field
    - `details` - Unknown field
    - `eventId` - Unknown field
    - `startRow` - Should always be 0
    - `endRow` - Total length of data object
    - `data` - A JSON object containing any appointments
  
## Events [^](#contents)
### loggedOn
Emitted when you're successfully logged into Zermelo.

### error
- `err` - An `Error` object

Emitted when an error occurs during logon. If this event isn't handled, the program will crash.
{'fraction_non_alphanumeric': 0.134990903577926, 'fraction_numerical': 0.006064281382656155, 'mean_word_length': 4.238881829733164, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 28, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3763538', 'n_tokens_mistral': 2746, 'n_tokens_neox': 2581, 'n_words': 796}