From 88f1d583266e887ea104c4a92711a92bb2ca04d2 Mon Sep 17 00:00:00 2001 From: OneLiL05 Date: Fri, 15 Sep 2023 20:33:35 +0200 Subject: [PATCH] community: change README.md and package.json --- README.md | 252 +--------------------------------- packages/nurekit/package.json | 1 + 2 files changed, 5 insertions(+), 248 deletions(-) diff --git a/README.md b/README.md index cc7caba..6f4c42e 100644 --- a/README.md +++ b/README.md @@ -14,262 +14,18 @@ npm i @nurejs/api ## Usage ```js -import { Nurekit } from "@nurejs/api" +import { Nurekit } from "@nurejs/api"; -const nurekit = new Nurekit() +const nurekit = new Nurekit(); ``` ## Contributing If you want to contribute to improving the project, firstly read [CONTIRBUTING.md](https://github.com/OneLiL05/nurekit/blob/main/CONTRIBUTING.md) -## Methods +## Documetation -### Get auditoriums - -[Reference](https://nure-dev.pp.ua/#%D0%B7%D0%B0%D0%BF%D0%B8%D1%82-%D0%BD%D0%B0-%D0%B0%D1%83%D0%B4%D0%B8%D1%82%D0%BE%D1%80%D1%96%D1%97) - -**Example:** - -```js -import { Nurekit } from "@nurejs/api" - -const nurekit = new Nurekit() - -const auditories = await nurekit.auditoriums.findMany() -``` - -**Output:** - -```ts -{ - id: number; - name: string; -}[] -``` - -### Get auditorium - -```js -import { Nurekit } from "@nurejs/api" - -const nurekit = new Nurekit() - -const auditories = await nurekit.auditoriums.findOne("285") -``` - -**Input:** - -```ts -{ - name: string -} -``` - -**Output:** - -```ts -{ - id: number; - name: string; -} -``` - -### Get groups - -[Reference](https://nure-dev.pp.ua/#%D0%B7%D0%B0%D0%BF%D0%B8%D1%82-%D0%BD%D0%B0-%D0%B3%D1%80%D1%83%D0%BF%D0%B8) - -**Example:** - -```js -import { Nurekit } from "@nurejs/api" - -const nurekit = new Nurekit() - -const groups = await nurekit.groups.findMany() -``` - -**Output:** - -```ts -{ - id: number; - name: string; -}[] -``` - -### Get a group - -**Example:** - -```js -import { Nurekit } from "@nurejs/api" - -const nurekit = new Nurekit() - -const groups = await nurekit.groups.findOne("пзпі-23-5") -``` - -**Input:** - -```ts -{ - name: string -} -``` - -**Output:** - -```ts -{ - id: number; - name: string; -} -``` - -### Get teachers - -[Reference](https://nure-dev.pp.ua/#%D0%B7%D0%B0%D0%BF%D0%B8%D1%82-%D0%BD%D0%B0-%D0%B2%D0%B8%D0%BA%D0%BB%D0%B0%D0%B4%D0%B0%D1%87%D1%96%D0%B2) - -**Example:** - -```js -import { Nurekit } from "@nurejs/api" - -const nurekit = new Nurekit() - -const teachers = await nurekit.teachers.findMany() -``` - -**Output:** - -```ts -{ - id: number; - fullName: string; - shortName: string; -}[] -``` - -### Get teacher - -[Reference](https://nure-dev.pp.ua/#%D0%B7%D0%B0%D0%BF%D0%B8%D1%82-%D0%BD%D0%B0-%D0%B2%D0%B8%D0%BA%D0%BB%D0%B0%D0%B4%D0%B0%D1%87%D1%96%D0%B2) - -**Example:** - -```js -import { Nurekit } from "@nurejs/api" - -const nurekit = new Nurekit() - -const teachers = await nurekit.teachers.findOne("Боцюра О. А.") -``` - -**Input:** - -```ts -shortName: string; -``` - -**Output:** - -```ts -{ - id: number; - fullName: string; - shortName: string; -} -``` - -### Get schedule - -[Reference](https://nure-dev.pp.ua/#%D0%B7%D0%B0%D0%BF%D0%B8%D1%82-%D0%BD%D0%B0-%D1%80%D0%BE%D0%B7%D0%BA%D0%BB%D0%B0%D0%B4) - -**Example:** - -```js -import { Nurekit } from "@nurejs/api" - -const nurekit = new Nurekit() - - -// For auditorium -const schedule = await nurekit.auditoriums.getSchedule({ - auditoriumName: "287", - startTime: "2023-09-11", - endTime: "2023-09-15", -}); - -// For teacher -const schedule = await nurekit.teachers.getSchedule({ - teacherName: "Боцюра О. А.", - startTime: "2023-09-11", - endTime: "2023-09-15", -}); - -// For group -const schedule = await nurekit.groups.getSchedule({ - groupName: "пзпі-23-5", - startTime: "2023-09-11", - endTime: "2023-09-15", -}); -``` - -**Input:** - -```ts -// For auditorium - -{ - auditoriumName: string, - startTime: string, - endTime: string, -} - -// For teacher - -{ - teacherName: string, - startTime: string, - endTime: string, -} - -// For group - -{ - groupName: string, - startTime: string, - endTime: string, -} -``` - -**Output:** - -```ts -{ - id: number; - startTime: number; - endTime: number; - auditorium: string; - numberPair: number; - type: string; - updatedAt: Date; - groups: { - id: number; - name: string; - }[]; - teachers: { - id: number; - fullName: string; - shortName: string; - }[]; - subject: { - id: number; - brief: string; - title: string; - }; -}[] -``` +You can read documentation [here](https://onelil05.github.io/nurekit/) ## Stay in touch diff --git a/packages/nurekit/package.json b/packages/nurekit/package.json index 2e9ccb0..93845b7 100644 --- a/packages/nurekit/package.json +++ b/packages/nurekit/package.json @@ -10,6 +10,7 @@ "type": "module", "license": "GNU GPLv3.0", "author": "Kyrylo Savieliev", + "homepage": "https://onelil05.github.io/nurekit/", "maintainers": [ { "name": "Kyrylo Savieliev",