4.0.0 • Published 5 months ago

epfl-unit-api v4.0.0

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
5 months ago

Install

npm i epfl-unit-api --save

Usage

const epflUnitApi = require('epfl-unit-api');

epflUnitApi.findUnitByName('mws').then((unit) => {
  console.log(unit.code);      // => 13033
  console.log(unit.name);      // => 'Middleware Services'
  console.log(unit.unitPath);  // => 'EPFL VPO VPO-SI ITOP ITOP-MWS'
}).catch((err) => {
  console.log(err);
});

epflUnitApi.findUnitByCode(13030, 'en').then((unit) => {
  console.log(unit.acronym);   // => 'ISAS-FSD'
  console.log(unit.name);      // => 'Full-Stack Development'
  console.log(unit.unitPath);  // => 'EPFL VPO VPO-SI ISAS ISAS-FSD'
}).catch((err) => {
  console.log(err);
});

API

.findUnitByName(unit, language)

Type: function

Returns a Promise with the unit as parameter.

unit

Type: string

The name of an EPFL unit.

language

Type: string
Default: en

Supported languages are English (en) and French (fr).

.findUnitByCode(code, language)

Type: function

Returns a Promise with the unit as parameter.

code

Type: number

The code of an EPFL unit.

language

Type: string
Default: en

Supported languages are English (en) and French (fr).

Contributing

Contributions are always welcome.

See Contributing.

Developer

License

Apache License 2.0

(c) William Belle, 2019-2023.

See the LICENSE file for more details.

4.0.0

5 months ago

3.0.3

10 months ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago