Skip to content

Commit

Permalink
docs: change docs
Browse files Browse the repository at this point in the history
  • Loading branch information
OneLiL05 committed Nov 26, 2023
1 parent 00feff9 commit bd3c1b5
Show file tree
Hide file tree
Showing 7 changed files with 896 additions and 1,118 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ JavaScript library for Nure API. Based on [nure-cist-api](https://github.com/nur
## Installation

```shell
npm i @nurejs/api
npm i nurekit
# yarn add nurekit
# pnpm add nurekit
```

## Usage

```js
import { Nurekit } from "@nurejs/api";
import { Nurekit } from "nurekit";

const nurekit = new Nurekit();
```
Expand Down
10 changes: 6 additions & 4 deletions apps/docs/src/content/docs/guides/setting-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ JavaScript library for Nure API. Based on [nure-cist-api](https://github.com/nur

## Installation

```typescript
npm i @nurejs/api
```shell
npm i nurekit
# yarn add nurekit
# pnpm add nurekit
```

## Usage

```typescript
import { Nurekit } from "@nurejs/api"
import { Nurekit } from "nurekit";

const nurekit = new Nurekit()
const nurekit = new Nurekit();
```

## Further reading
Expand Down
51 changes: 25 additions & 26 deletions apps/docs/src/content/docs/reference/auditoriums-endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Method returns a group.
### Example

```typescript
import { Nurekit } from "@nurejs/api";
import { Nurekit } from "nurekit";

const nurekit = new Nurekit();

Expand All @@ -20,7 +20,7 @@ const auditorium = await nurekit.auditoriums.findOne("285");
### API

```typescript
const { id, name } = await nurekit.auditoriums.findOne(name);
const { Id, Name } = await nurekit.auditoriums.findOne(name);
```

#### Input
Expand All @@ -31,8 +31,8 @@ const { id, name } = await nurekit.auditoriums.findOne(name);

In output you will get an object with such fields:

- `id: number`
- `name: string`
- `Id: number`
- `Name: string`

## `findMany`

Expand All @@ -41,7 +41,7 @@ Method returns an array of auditoriums.
### Example

```typescript
import { Nurekit } from "@nurejs/api";
import { Nurekit } from "nurekit";

const nurekit = new Nurekit();

Expand All @@ -62,8 +62,8 @@ This method doesn't need any arguments.

In output you will get an array of objects with such fields:

- `id: number`
- `name: string`
- `Id: number`
- `Name: string`

## `getSchedule`

Expand All @@ -72,7 +72,7 @@ Method returns a schedule for an auditorium.
### Example

```typescript
import { Nurekit } from "@nurejs/api";
import { Nurekit } from "nurekit";

const nurekit = new Nurekit();

Expand Down Expand Up @@ -103,21 +103,20 @@ const schedule = await nurekit.auditoriums.getSchedule({

In output you will get an array of objects with such fields

- `id: number`
- `startTime: number`
- `endTime: number`
- `auditorium: string`
- `numberPair: number`
- `type: string`
- `updatedAt: Date`
- `groups: IGroup[]`
- `id: number`
- `name: string`
- `teachers: ITeacher[]`
- `id: number`
- `fullName: string`
- `shortName: string`
- `subject: ISubject[]`
- `id: number`
- `brief: string`
- `title: string`
- `Id: number`
- `StartTime: number`
- `EndTime: number`
- `Auditorium: string`
- `NumberPair: number`
- `Type: string`
- `Groups: IGroup[]`
- `Id: number`
- `Name: string`
- `Teachers: ITeacher[]`
- `Id: number`
- `FullName: string`
- `ShortName: string`
- `Subject: ISubject[]`
- `Id: number`
- `Brief: string`
- `Title: string`
55 changes: 27 additions & 28 deletions apps/docs/src/content/docs/reference/groups-endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Method returns an auditorium.
### Example

```typescript
import { Nurekit } from "@nurejs/api";
import { Nurekit } from "nurekit";

const nurekit = new Nurekit();

Expand All @@ -20,7 +20,7 @@ const auditorium = await nurekit.groups.findOne("пзпі-23-5");
### API

```typescript
const { id, name } = await nurekit.groups.findOne(name);
const { Id, Name } = await nurekit.groups.findOne(name);
```

#### Input
Expand All @@ -31,8 +31,8 @@ const { id, name } = await nurekit.groups.findOne(name);

In output you will get an object with such fields:

- `id: number` - the group's id;
- `name: string` - the group's name.
- `Id: number` - the group's id;
- `Name: string` - the group's name.

## `findMany`

Expand All @@ -41,17 +41,17 @@ Method returns an array of groups.
### Example

```typescript
import { Nurekit } from "@nurejs/api";
import { Nurekit } from "nurekit";

const nurekit = new Nurekit();

const auditoriums = await nurekit.groups.findMany();
const groups = await nurekit.groups.findMany();
```

### API

```typescript
const auditoriums = await nurekit.groups.findMany();
const groups = await nurekit.groups.findMany();
```

#### Input
Expand All @@ -62,8 +62,8 @@ This method doesn't need any arguments.

In output you will get an array of objects with such fields:

- `id: number`
- `name: string`
- `Id: number`
- `Name: string`

## `getSchedule`

Expand All @@ -72,7 +72,7 @@ Method returns a schedule for a group.
### Example

```typescript
import { Nurekit } from "@nurejs/api";
import { Nurekit } from "nurekit";

const nurekit = new Nurekit();

Expand Down Expand Up @@ -103,21 +103,20 @@ const schedule = await nurekit.groups.getSchedule({

In output you will get an array of objects with such fields

- `id: number`
- `startTime: number`
- `endTime: number`
- `auditorium: string`
- `numberPair: number`
- `type: string`
- `updatedAt: Date`
- `groups: IGroup[]`
- `id: number`
- `name: string`
- `teachers: ITeacher[]`
- `id: number`
- `fullName: string`
- `shortName: string`
- `subject: ISubject[]`
- `id: number`
- `brief: string`
- `title: string`
- `Id: number`
- `StartTime: number`
- `EndTime: number`
- `Auditorium: string`
- `NumberPair: number`
- `Type: string`
- `Groups: IGroup[]`
- `Id: number`
- `Name: string`
- `Teachers: ITeacher[]`
- `Id: number`
- `FullName: string`
- `ShortName: string`
- `Subject: ISubject[]`
- `Id: number`
- `Brief: string`
- `Title: string`
55 changes: 27 additions & 28 deletions apps/docs/src/content/docs/reference/teachers-endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ Method returns an auditorium.
### Example

```typescript
import { Nurekit } from "@nurejs/api";
import { Nurekit } from "nurekit";

const nurekit = new Nurekit();

const auditorium = await nurekit.teachers.findOne("Боцюра О. А.");
const teacher = await nurekit.teachers.findOne("Боцюра О. А.");
```

### API

```typescript
const { id, name } = await nurekit.teachers.findOne(shortName);
const { Id, Name } = await nurekit.teachers.findOne(shortName);
```

#### Input
Expand All @@ -31,9 +31,9 @@ const { id, name } = await nurekit.teachers.findOne(shortName);

In output you will get an object with such fields:

- `id: number`
- `shortName: string`
- `fullName: string`
- `Id: number`
- `ShortName: string`
- `FullName: string`

## `findMany`

Expand All @@ -42,17 +42,17 @@ Method returns an array of teachers.
### Example

```typescript
import { Nurekit } from "@nurejs/api";
import { Nurekit } from "nurekit";

const nurekit = new Nurekit();

const auditoriums = await nurekit.teachers.findMany();
const teachers = await nurekit.teachers.findMany();
```

### API

```typescript
const auditoriums = await nurekit.teachers.findMany();
const teachers = await nurekit.teachers.findMany();
```

#### Input
Expand All @@ -74,7 +74,7 @@ Method returns a schedule for a teacher.
### Example

```typescript
import { Nurekit } from "@nurejs/api";
import { Nurekit } from "nurekit";

const nurekit = new Nurekit();

Expand Down Expand Up @@ -105,21 +105,20 @@ const schedule = await nurekit.groups.getSchedule({

In output you will get an array of objects with such fields

- `id: number`
- `startTime: number`
- `endTime: number`
- `auditorium: string`
- `numberPair: number`
- `type: string`
- `updatedAt: Date`
- `groups: IGroup[]`
- `id: number`
- `name: string`
- `teachers: ITeacher[]`
- `id: number`
- `fullName: string`
- `shortName: string`
- `subject: ISubject[]`
- `id: number`
- `brief: string`
- `title: string`
- `Id: number`
- `StartTime: number`
- `EndTime: number`
- `Auditorium: string`
- `NumberPair: number`
- `Type: string`
- `Groups: IGroup[]`
- `Id: number`
- `Name: string`
- `Teachers: ITeacher[]`
- `Id: number`
- `FullName: string`
- `ShortName: string`
- `Subject: ISubject[]`
- `Id: number`
- `Brief: string`
- `Title: string`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"namespace": "nurejs",
"namespace": "nurekit",
"author": "Kyrylo Savieliev",
"license": "MIT",
"private": true,
Expand Down
Loading

0 comments on commit bd3c1b5

Please sign in to comment.