From 2f42abff770fd5b54e4c3619836981c76366e463 Mon Sep 17 00:00:00 2001 From: Filip Izydorczyk Date: Tue, 25 Aug 2020 16:40:51 +0200 Subject: [PATCH] Added docs --- docs/api.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docs/api.md diff --git a/docs/api.md b/docs/api.md new file mode 100644 index 0000000..30c31b6 --- /dev/null +++ b/docs/api.md @@ -0,0 +1,56 @@ +# Dokumetacja API + +| Api | Zadania tej klasy | +| ---------------------------------------------- | ---------------------------------------------------------------- | +| [/config](#config) | Załadowanie konfiguracji startowej do aplikacji PlanNaPlan | +| [/getCoursesWithGroups](#getCoursesWithGroups) | Zwrócenie wszytskich kursów (ćwiczenia, wykłady) razem z grupami | +| [/getCourseGroups](#getCourseGroups) | Zwrócenie grup dla danego kursu | + +## config + +Source code: [link](../restservice/src/main/java/com/plannaplan/controllers/ConfigController.java) + +``` +POST /config +``` + +#### Description + +Endpoint konfigurujacy caly system i importujacy dane do bazy. + +#### Parameters + +| Type | Name | Consumes | Description | Type | +| ---- | ----------------------- | ------------------- | ------------------------------- | ---- | +| Body | **file**
required | multipart/form-data | Plik .xlsx z potrzebnymi danymi | file | + +## getCoursesWithGroups + +Source code: [link](../restservice/src/main/java/com/plannaplan/controllers/getCoursesWithGroups.java) + +``` +GET /getCoursesWithGroups +``` + +#### Description + +Zwraca wszystkie dostepne kursy wraz z lista grup dla poszczegolnych kursow. + +## getCourseGroups + +Source code: [link](../restservice/src/main/java/com/plannaplan/controllers/GroupController.java) + +``` +GET /getCourseGroups +``` + +#### Description + +Endpoint konfigurujacy caly system i importujacy dane do bazy. + +#### Parameters + +| Type | Name | Consumes | Description | Type | +| ----------- | --------------------- | -------- | ----------------------------------------- | ---- | +| Query Param | **id**
required | - | id kursu dla ktorego chcemy zwrocic grupy | int | +| Query Param | **capacity**
| - | czy ma zwrocic pole pojemnosci grupy | bool |