open-index/open-npm huggingface dataset:
npm package: @godlessssss/bakalari.js
Description: A simple Bakalari API wrapper written in JavaScript
Author: godlessssss
Latest version: 1.5.0

# bakalari.js

A *simple* JavaScript Bakaláři API wrapper.

## Installation

*You need Node and NPM (Node Package Manager)*

`npm install @godlessssss/bakalari.js`

## Usage

```js
// Requiring the library from npm
const Bakalari = require('@godlessssss/bakalari.js')

// Instancing a user with url, username and password
let client = new Bakalari.User('URL', 'USERNAME', 'PASSWORD')

// Logging in to the Bakalari API
client.login()

// Waiting for client to be ready
client.on('ready', async () => {
    // Getting marks info from the API
    let marks = await client.get(Bakalari.Modules.Marks)
    // logging it to the console
    console.log(marks)
});
```

## Available Modules

### Main function
```js
await client.get(Module, ...Arguments)
```

#### Bakalari.Modules.Marks
```js
await client.get(Bakalari.Modules.Marks)
```
- returns Array of Subjects, that contain Marks Array

#### Bakalari.Modules.Subjects
```js
await client.get(Bakalari.Modules.Subjects)
```
- returns Array of Subjects

#### Bakalari.Modules.Absence
```js
await client.get(Bakalari.Modules.Absence)
```
- returns Absence Array and Absence by Subject Array

#### Bakalari.Modules.Events
```js
await client.get(Bakalari.Modules.Events)
```
- returns Array of Events

#### Bakalri.Modules.Homeworks
```js
await client.get(Bakalari.Modules.Homeworks)
```
- returns Array of Homeworks

#### Bakalari.Modules.UserInfo
```js
await client.get(Bakalari.Modules.UserInfo)
```
- returns User Object

#### Bakalari.Modules.Timetable

- Permanent Timetable
```js
await client.get(Bakalari.Modules.Timetable)
```

- Actual Timetable
```js
await client.get(Bakalari.Modules.Timetable, 'actual')
```

#### Bakalari.Modules.Substitutions
```js
await client.get(Bakalari.Modules.Substitutions)
```
- returns Array of Substitutions

#### Bakalari.Modules.FinalMarks
```js
await client.get(Bakalari.Modules.FinalMarks)
```
- returns Array of school certificates and Final Marks for your term

#### Bakalari.Modules.Whatif
```js
await client.get(Bakalari.Modules.Whatif, array_of_marks)
```

- Example
```js
await client.get(Bakalari.Modules.Whatif, [
    {
        MarkText: '1',
        Weight: 4,
        SubjectId: ' 2',
        Id: null,
        MaxPoints: 0
    }
])
```

**MarkText:** *The mark number you want to add to the prediction - must be string*

**Weight:** *The weight of the mark*

**SubjectId:** *The ID of the subject you want to predict - use Subjects module to get the ID*

**Id:** *The ID of mark - prediction marks is always null*

**MaxPoints:** *Maximum number of points to get - this is only used when you use points system*

- returns Array of Marks with presumed subject average
npm package: @godlikejt/node-red-contrib-sftp
Description: SFTP communication, add recursive list and filter support.
Author: godlikejt
Latest version: 0.0.7

# node-red-contrib-better-sftp-pro

**Add High level operation: Recursive list and filter support.**

Better SFTP was created out of necessity for a SFTP node which 
was fully implemented and had several options to configure algorithms.

Big shout out to [jyu213][https://github.com/jyu213] for creating [ssh2-sftp-client][https://github.com/jyu213/ssh2-sftp-client] to make development
of this node easy.

Install
-------

Run the following command in the root directory of your Node-RED install

    npm install @godlikejt/node-red-contrib-sftp
    
SFTP
-------
**List Directory** - Lists contents of `msg.payload` as a directory OR working directory on node config.

**Get** - Set `msg.payload` to get the file OR working directory + file name in configuration will be used.

**Put** - Set `msg.payload.data` to either the file name, buffer stream, or buffer object of the source file. 
Set `msg.payload.filename` to the desired name of remote file. 
If `msg.payload.filename` is not specified filename in node config will be used. 
File contents will be uploaded to the SFTP server in the working directory specified.

**Delete File** - Set `msg.payload` to the name of the file you wish to delete in the working directory.

**Make Directory** - Set `msg.payload` to the name of the directory to make. If blank working directory will be used.

**Remove Directory** - Set `msg.payload` to the name of the directory to remove. If blank working directory will be used.

Configuration
-------

Host, username, and password are required to configure a new SFTP client.

Algorithms are set to pre-defined default values. If you need to modify them see
[ssh2-streams][https://github.com/mscdex/ssh2-streams] for more information.

License
-------

See [license](https://github.com/dbian/node-red-contrib-better-sftp-pro/blob/master/LICENSE)


[https://github.com/mscdex/ssh2-streams]: https://github.com/mscdex/ssh2-streams
[https://github.com/jyu213]: https://github.com/jyu213
[https://github.com/jyu213/ssh2-sftp-client]: https://github.com/jyu213/ssh2-sftp-client