Skip to content

Commit

Permalink
community: change README.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
OneLiL05 committed Oct 2, 2023
1 parent 2bfc7d8 commit f2947ac
Showing 1 changed file with 4 additions and 248 deletions.
252 changes: 4 additions & 248 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f2947ac

Please sign in to comment.