Commit fcf8f200 authored by Thiago Nitschke's avatar Thiago Nitschke
Browse files

[CONFIG] User swagger-codegen to generate models + adapt them to match business rules

parent f74a8f34
Showing with 1899 additions and 0 deletions
+1899 -0
# swagger.model.AdditionalInfo
## Load the model package
```dart
import 'package:swagger/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional] [default to null]
**rating** | **int** | | [optional] [default to null]
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
# swagger.model.Mood
## Load the model package
```dart
import 'package:swagger/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [default to null]
**name** | **String** | | [optional] [default to null]
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
# swagger.api.MoodApi
## Load the API package
```dart
import 'package:swagger/api.dart';
```
All URIs are relative to *https://petstore.swagger.io/localhost:8080*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addMood**](MoodApi.md#addMood) | **POST** /mood | Add a mood
[**deleteMood**](MoodApi.md#deleteMood) | **DELETE** /mood/{id} | Deletes a mood
[**findMoodByID**](MoodApi.md#findMoodByID) | **GET** /mood/{id} | Finds mood by id
[**getAllMoods**](MoodApi.md#getAllMoods) | **GET** /mood | Returns all moods
[**updateMood**](MoodApi.md#updateMood) | **PUT** /mood/{id} | Update an existing mood
# **addMood**
> addMood(body)
Add a mood
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new MoodApi();
var body = new Mood(); // Mood |
try {
api_instance.addMood(body);
} catch (e) {
print("Exception when calling MoodApi->addMood: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Mood**](Mood.md)| |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **deleteMood**
> deleteMood(id)
Deletes a mood
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new MoodApi();
var id = id_example; // String | ID of mood to delete
try {
api_instance.deleteMood(id);
} catch (e) {
print("Exception when calling MoodApi->deleteMood: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of mood to delete |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **findMoodByID**
> Mood findMoodByID(id)
Finds mood by id
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new MoodApi();
var id = id_example; // String | ID of mood to return
try {
var result = api_instance.findMoodByID(id);
print(result);
} catch (e) {
print("Exception when calling MoodApi->findMoodByID: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of mood to return |
### Return type
[**Mood**](Mood.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **getAllMoods**
> List<Mood> getAllMoods()
Returns all moods
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new MoodApi();
try {
var result = api_instance.getAllMoods();
print(result);
} catch (e) {
print("Exception when calling MoodApi->getAllMoods: $e\n");
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<Mood>**](Mood.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **updateMood**
> Mood updateMood(id, body)
Update an existing mood
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new MoodApi();
var id = id_example; // String | ID of mood to update
var body = new Mood(); // Mood |
try {
var result = api_instance.updateMood(id, body);
print(result);
} catch (e) {
print("Exception when calling MoodApi->updateMood: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of mood to update |
**body** | [**Mood**](Mood.md)| |
### Return type
[**Mood**](Mood.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# swagger
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
This Dart package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.0
- Build package: io.swagger.codegen.languages.DartClientCodegen
## Requirements
Dart 1.20.0 or later OR Flutter 0.0.20 or later
## Installation & Usage
### Github
If this Dart package is published to Github, please include the following in pubspec.yaml
```
name: swagger
version: 1.0.0
description: Swagger API client
dependencies:
swagger:
git: https://github.com//.git
version: 'any'
```
### Local
To use the package in your local drive, please include the following in pubspec.yaml
```
dependencies:
swagger:
path: /path/to/swagger
```
## Tests
TODO
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```dart
import 'package:swagger/api.dart';
var api_instance = new MoodApi();
var body = new Mood(); // Mood |
try {
api_instance.addMood(body);
} catch (e) {
print("Exception when calling MoodApi->addMood: $e\n");
}
```
## Documentation for API Endpoints
All URIs are relative to *https://petstore.swagger.io/localhost:8080*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*MoodApi* | [**addMood**](../docs//MoodApi.md#addmood) | **POST** /mood | Add a mood
*MoodApi* | [**deleteMood**](../docs//MoodApi.md#deletemood) | **DELETE** /mood/{id} | Deletes a mood
*MoodApi* | [**findMoodByID**](../docs//MoodApi.md#findmoodbyid) | **GET** /mood/{id} | Finds mood by id
*MoodApi* | [**getAllMoods**](../docs//MoodApi.md#getallmoods) | **GET** /mood | Returns all moods
*MoodApi* | [**updateMood**](../docs//MoodApi.md#updatemood) | **PUT** /mood/{id} | Update an existing mood
*RoutineDataApi* | [**addRoutineData**](../docs//RoutineDataApi.md#addroutinedata) | **POST** /routine_data | Add a routine data
*RoutineDataApi* | [**deleteRoutineData**](../docs//RoutineDataApi.md#deleteroutinedata) | **DELETE** /routine_data/{id} | Deletes a routine data
*RoutineDataApi* | [**findRoutineDataByID**](../docs//RoutineDataApi.md#findroutinedatabyid) | **GET** /routine_data/{id} | Finds routine data by id
*RoutineDataApi* | [**getAllRoutineData**](../docs//RoutineDataApi.md#getallroutinedata) | **GET** /routine_data | Returns all routines data
*RoutineDataApi* | [**updateRoutineData**](../docs//RoutineDataApi.md#updateroutinedata) | **PUT** /routine_data/{id} | Update an existing routine data
*RoutineDayApi* | [**addRoutineDay**](../docs//RoutineDayApi.md#addroutineday) | **POST** /routine_day | Add a routine day
*RoutineDayApi* | [**deleteRoutineDay**](../docs//RoutineDayApi.md#deleteroutineday) | **DELETE** /routine_day/{id} | Deletes a routine day
*RoutineDayApi* | [**findRoutineDayByID**](../docs//RoutineDayApi.md#findroutinedaybyid) | **GET** /routine_day/{id} | Finds routine day by id
*RoutineDayApi* | [**getAllRoutineDay**](../docs//RoutineDayApi.md#getallroutineday) | **GET** /routine_day | Returns all routine days
*RoutineDayApi* | [**updateRoutineDay**](../docs//RoutineDayApi.md#updateroutineday) | **PUT** /routine_day/{id} | Update an existing routine day
*RoutinePlanApi* | [**addRoutinePlan**](../docs//RoutinePlanApi.md#addroutineplan) | **POST** /routine_plan | Add a routine plan
*RoutinePlanApi* | [**deleteRoutinePlan**](../docs//RoutinePlanApi.md#deleteroutineplan) | **DELETE** /routine_plan/{id} | Deletes a routine plan
*RoutinePlanApi* | [**findRoutinePlanByID**](../docs//RoutinePlanApi.md#findroutineplanbyid) | **GET** /routine_plan/{id} | Finds routine plan by id
*RoutinePlanApi* | [**getAllRoutinePlan**](../docs//RoutinePlanApi.md#getallroutineplan) | **GET** /routine_plan | Returns all routine plans
*RoutinePlanApi* | [**updateRoutinePlan**](../docs//RoutinePlanApi.md#updateroutineplan) | **PUT** /routine_plan/{id} | Update an existing routine plan
*SubjectApi* | [**findSubjectByName**](../docs//SubjectApi.md#findsubjectbyname) | **GET** /subject/{name} | Finds subject by name
*SubjectApi* | [**getAllSubjects**](../docs//SubjectApi.md#getallsubjects) | **GET** /subject | Returns all subjects
*TaskApi* | [**addTask**](../docs//TaskApi.md#addtask) | **POST** /task | Add a task
*TaskApi* | [**deleteTask**](../docs//TaskApi.md#deletetask) | **DELETE** /task/{id} | Deletes a task
*TaskApi* | [**findTaskByID**](../docs//TaskApi.md#findtaskbyid) | **GET** /task/{id} | Finds task by id
*TaskApi* | [**getAllTask**](../docs//TaskApi.md#getalltask) | **GET** /task | Returns all tasks
*TaskApi* | [**updateTask**](../docs//TaskApi.md#updatetask) | **PUT** /task/{id} | Update an existing task
*WeeklyRoutineApi* | [**addWeeklyRoutine**](../docs//WeeklyRoutineApi.md#addweeklyroutine) | **POST** /weekly_routine | Add a weekly routine
*WeeklyRoutineApi* | [**deleteWeeklyRoutine**](../docs//WeeklyRoutineApi.md#deleteweeklyroutine) | **DELETE** /weekly_routine/{id} | Deletes a weekly routine
*WeeklyRoutineApi* | [**findWeeklyRoutineByID**](../docs//WeeklyRoutineApi.md#findweeklyroutinebyid) | **GET** /weekly_routine/{id} | Finds weekly routine by id
*WeeklyRoutineApi* | [**getAllWeeklyRoutine**](../docs//WeeklyRoutineApi.md#getallweeklyroutine) | **GET** /weekly_routine | Returns all weekly routines
*WeeklyRoutineApi* | [**updateWeeklyRoutine**](../docs//WeeklyRoutineApi.md#updateweeklyroutine) | **PUT** /weekly_routine/{id} | Update an existing weekly routine
## Documentation For Models
- [AdditionalInfo](../docs//AdditionalInfo.md)
- [Mood](../docs//Mood.md)
- [RoutineData](../docs//RoutineData.md)
- [RoutineDay](../docs//RoutineDay.md)
- [RoutinePlan](../docs//RoutinePlan.md)
- [Subject](../docs//Subject.md)
- [Task](../docs//Task.md)
- [User](../docs//User.md)
- [WeeklyRoutine](../docs//WeeklyRoutine.md)
## Documentation For Authorization
All endpoints do not require authorization.
## Author
# swagger.model.RoutineData
## Load the model package
```dart
import 'package:swagger/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [default to null]
**routineId** | **String** | | [optional] [default to null]
**userId** | **String** | | [optional] [default to null]
**moods** | [**List&lt;Mood&gt;**](Mood.md) | | [optional] [default to []]
**additionalInfo** | [**List&lt;AdditionalInfo&gt;**](AdditionalInfo.md) | | [optional] [default to []]
**dayDescription** | **String** | | [optional] [default to null]
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
# swagger.api.RoutineDataApi
## Load the API package
```dart
import 'package:swagger/api.dart';
```
All URIs are relative to *https://petstore.swagger.io/localhost:8080*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addRoutineData**](RoutineDataApi.md#addRoutineData) | **POST** /routine_data | Add a routine data
[**deleteRoutineData**](RoutineDataApi.md#deleteRoutineData) | **DELETE** /routine_data/{id} | Deletes a routine data
[**findRoutineDataByID**](RoutineDataApi.md#findRoutineDataByID) | **GET** /routine_data/{id} | Finds routine data by id
[**getAllRoutineData**](RoutineDataApi.md#getAllRoutineData) | **GET** /routine_data | Returns all routines data
[**updateRoutineData**](RoutineDataApi.md#updateRoutineData) | **PUT** /routine_data/{id} | Update an existing routine data
# **addRoutineData**
> addRoutineData(body)
Add a routine data
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutineDataApi();
var body = new RoutineData(); // RoutineData |
try {
api_instance.addRoutineData(body);
} catch (e) {
print("Exception when calling RoutineDataApi->addRoutineData: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**RoutineData**](RoutineData.md)| |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **deleteRoutineData**
> deleteRoutineData(id)
Deletes a routine data
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutineDataApi();
var id = id_example; // String | ID of routine data to delete
try {
api_instance.deleteRoutineData(id);
} catch (e) {
print("Exception when calling RoutineDataApi->deleteRoutineData: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of routine data to delete |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **findRoutineDataByID**
> RoutineData findRoutineDataByID(id)
Finds routine data by id
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutineDataApi();
var id = id_example; // String | ID of routine data to return
try {
var result = api_instance.findRoutineDataByID(id);
print(result);
} catch (e) {
print("Exception when calling RoutineDataApi->findRoutineDataByID: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of routine data to return |
### Return type
[**RoutineData**](RoutineData.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **getAllRoutineData**
> List<RoutineData> getAllRoutineData()
Returns all routines data
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutineDataApi();
try {
var result = api_instance.getAllRoutineData();
print(result);
} catch (e) {
print("Exception when calling RoutineDataApi->getAllRoutineData: $e\n");
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<RoutineData>**](RoutineData.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **updateRoutineData**
> RoutineData updateRoutineData(id, body)
Update an existing routine data
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutineDataApi();
var id = id_example; // String | ID of routine data to update
var body = new RoutineData(); // RoutineData |
try {
var result = api_instance.updateRoutineData(id, body);
print(result);
} catch (e) {
print("Exception when calling RoutineDataApi->updateRoutineData: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of routine data to update |
**body** | [**RoutineData**](RoutineData.md)| |
### Return type
[**RoutineData**](RoutineData.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# swagger.model.RoutineDay
## Load the model package
```dart
import 'package:swagger/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [default to null]
**date** | [**DateTime**](DateTime.md) | | [optional] [default to null]
**chores** | [**List&lt;Task&gt;**](Task.md) | | [optional] [default to []]
**routineDate** | [**List&lt;RoutineData&gt;**](RoutineData.md) | | [optional] [default to []]
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
# swagger.api.RoutineDayApi
## Load the API package
```dart
import 'package:swagger/api.dart';
```
All URIs are relative to *https://petstore.swagger.io/localhost:8080*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addRoutineDay**](RoutineDayApi.md#addRoutineDay) | **POST** /routine_day | Add a routine day
[**deleteRoutineDay**](RoutineDayApi.md#deleteRoutineDay) | **DELETE** /routine_day/{id} | Deletes a routine day
[**findRoutineDayByID**](RoutineDayApi.md#findRoutineDayByID) | **GET** /routine_day/{id} | Finds routine day by id
[**getAllRoutineDay**](RoutineDayApi.md#getAllRoutineDay) | **GET** /routine_day | Returns all routine days
[**updateRoutineDay**](RoutineDayApi.md#updateRoutineDay) | **PUT** /routine_day/{id} | Update an existing routine day
# **addRoutineDay**
> addRoutineDay(body)
Add a routine day
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutineDayApi();
var body = new RoutineDay(); // RoutineDay |
try {
api_instance.addRoutineDay(body);
} catch (e) {
print("Exception when calling RoutineDayApi->addRoutineDay: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**RoutineDay**](RoutineDay.md)| |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **deleteRoutineDay**
> deleteRoutineDay(id)
Deletes a routine day
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutineDayApi();
var id = id_example; // String | ID of routine day to delete
try {
api_instance.deleteRoutineDay(id);
} catch (e) {
print("Exception when calling RoutineDayApi->deleteRoutineDay: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of routine day to delete |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **findRoutineDayByID**
> RoutineDay findRoutineDayByID(id)
Finds routine day by id
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutineDayApi();
var id = id_example; // String | ID of routine day to return
try {
var result = api_instance.findRoutineDayByID(id);
print(result);
} catch (e) {
print("Exception when calling RoutineDayApi->findRoutineDayByID: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of routine day to return |
### Return type
[**RoutineDay**](RoutineDay.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **getAllRoutineDay**
> List<RoutineDay> getAllRoutineDay()
Returns all routine days
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutineDayApi();
try {
var result = api_instance.getAllRoutineDay();
print(result);
} catch (e) {
print("Exception when calling RoutineDayApi->getAllRoutineDay: $e\n");
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<RoutineDay>**](RoutineDay.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **updateRoutineDay**
> RoutineDay updateRoutineDay(id, body)
Update an existing routine day
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutineDayApi();
var id = id_example; // String | ID of routine day to update
var body = new RoutineDay(); // RoutineDay |
try {
var result = api_instance.updateRoutineDay(id, body);
print(result);
} catch (e) {
print("Exception when calling RoutineDayApi->updateRoutineDay: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of routine day to update |
**body** | [**RoutineDay**](RoutineDay.md)| |
### Return type
[**RoutineDay**](RoutineDay.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# swagger.model.RoutinePlan
## Load the model package
```dart
import 'package:swagger/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [default to null]
**numberOfWeeks** | **int** | | [optional] [default to null]
**subjects** | [**List&lt;Subject&gt;**](Subject.md) | | [optional] [default to []]
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
# swagger.api.RoutinePlanApi
## Load the API package
```dart
import 'package:swagger/api.dart';
```
All URIs are relative to *https://petstore.swagger.io/localhost:8080*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addRoutinePlan**](RoutinePlanApi.md#addRoutinePlan) | **POST** /routine_plan | Add a routine plan
[**deleteRoutinePlan**](RoutinePlanApi.md#deleteRoutinePlan) | **DELETE** /routine_plan/{id} | Deletes a routine plan
[**findRoutinePlanByID**](RoutinePlanApi.md#findRoutinePlanByID) | **GET** /routine_plan/{id} | Finds routine plan by id
[**getAllRoutinePlan**](RoutinePlanApi.md#getAllRoutinePlan) | **GET** /routine_plan | Returns all routine plans
[**updateRoutinePlan**](RoutinePlanApi.md#updateRoutinePlan) | **PUT** /routine_plan/{id} | Update an existing routine plan
# **addRoutinePlan**
> addRoutinePlan(body)
Add a routine plan
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutinePlanApi();
var body = new RoutinePlan(); // RoutinePlan |
try {
api_instance.addRoutinePlan(body);
} catch (e) {
print("Exception when calling RoutinePlanApi->addRoutinePlan: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**RoutinePlan**](RoutinePlan.md)| |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **deleteRoutinePlan**
> deleteRoutinePlan(id)
Deletes a routine plan
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutinePlanApi();
var id = id_example; // String | ID of routine plan to delete
try {
api_instance.deleteRoutinePlan(id);
} catch (e) {
print("Exception when calling RoutinePlanApi->deleteRoutinePlan: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of routine plan to delete |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **findRoutinePlanByID**
> RoutinePlan findRoutinePlanByID(id)
Finds routine plan by id
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutinePlanApi();
var id = id_example; // String | ID of routine plan to return
try {
var result = api_instance.findRoutinePlanByID(id);
print(result);
} catch (e) {
print("Exception when calling RoutinePlanApi->findRoutinePlanByID: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of routine plan to return |
### Return type
[**RoutinePlan**](RoutinePlan.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **getAllRoutinePlan**
> List<RoutinePlan> getAllRoutinePlan()
Returns all routine plans
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutinePlanApi();
try {
var result = api_instance.getAllRoutinePlan();
print(result);
} catch (e) {
print("Exception when calling RoutinePlanApi->getAllRoutinePlan: $e\n");
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<RoutinePlan>**](RoutinePlan.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **updateRoutinePlan**
> RoutinePlan updateRoutinePlan(id, body)
Update an existing routine plan
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new RoutinePlanApi();
var id = id_example; // String | ID of routine plan to update
var body = new RoutinePlan(); // RoutinePlan |
try {
var result = api_instance.updateRoutinePlan(id, body);
print(result);
} catch (e) {
print("Exception when calling RoutinePlanApi->updateRoutinePlan: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of routine plan to update |
**body** | [**RoutinePlan**](RoutinePlan.md)| |
### Return type
[**RoutinePlan**](RoutinePlan.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# swagger.model.Subject
## Load the model package
```dart
import 'package:swagger/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [default to null]
**name** | **String** | | [optional] [default to null]
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
# swagger.api.SubjectApi
## Load the API package
```dart
import 'package:swagger/api.dart';
```
All URIs are relative to *https://petstore.swagger.io/localhost:8080*
Method | HTTP request | Description
------------- | ------------- | -------------
[**findSubjectByName**](SubjectApi.md#findSubjectByName) | **GET** /subject/{name} | Finds subject by name
[**getAllSubjects**](SubjectApi.md#getAllSubjects) | **GET** /subject | Returns all subjects
# **findSubjectByName**
> Subject findSubjectByName(name)
Finds subject by name
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new SubjectApi();
var name = name_example; // String | Name of subject to return
try {
var result = api_instance.findSubjectByName(name);
print(result);
} catch (e) {
print("Exception when calling SubjectApi->findSubjectByName: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name** | **String**| Name of subject to return |
### Return type
[**Subject**](Subject.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **getAllSubjects**
> List<Subject> getAllSubjects()
Returns all subjects
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new SubjectApi();
try {
var result = api_instance.getAllSubjects();
print(result);
} catch (e) {
print("Exception when calling SubjectApi->getAllSubjects: $e\n");
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<Subject>**](Subject.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# swagger.model.Task
## Load the model package
```dart
import 'package:swagger/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [default to null]
**name** | **String** | | [optional] [default to null]
**description** | **String** | | [optional] [default to null]
**parentRating** | **int** | | [optional] [default to null]
**childrenRating** | **int** | | [optional] [default to null]
**challenge** | **bool** | | [optional] [default to null]
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
# swagger.api.TaskApi
## Load the API package
```dart
import 'package:swagger/api.dart';
```
All URIs are relative to *https://petstore.swagger.io/localhost:8080*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addTask**](TaskApi.md#addTask) | **POST** /task | Add a task
[**deleteTask**](TaskApi.md#deleteTask) | **DELETE** /task/{id} | Deletes a task
[**findTaskByID**](TaskApi.md#findTaskByID) | **GET** /task/{id} | Finds task by id
[**getAllTask**](TaskApi.md#getAllTask) | **GET** /task | Returns all tasks
[**updateTask**](TaskApi.md#updateTask) | **PUT** /task/{id} | Update an existing task
# **addTask**
> addTask(body)
Add a task
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new TaskApi();
var body = new Task(); // Task |
try {
api_instance.addTask(body);
} catch (e) {
print("Exception when calling TaskApi->addTask: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Task**](Task.md)| |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **deleteTask**
> deleteTask(id)
Deletes a task
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new TaskApi();
var id = id_example; // String | ID of task to delete
try {
api_instance.deleteTask(id);
} catch (e) {
print("Exception when calling TaskApi->deleteTask: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of task to delete |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **findTaskByID**
> Task findTaskByID(id)
Finds task by id
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new TaskApi();
var id = id_example; // String | ID of task to return
try {
var result = api_instance.findTaskByID(id);
print(result);
} catch (e) {
print("Exception when calling TaskApi->findTaskByID: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of task to return |
### Return type
[**Task**](Task.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **getAllTask**
> List<Task> getAllTask()
Returns all tasks
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new TaskApi();
try {
var result = api_instance.getAllTask();
print(result);
} catch (e) {
print("Exception when calling TaskApi->getAllTask: $e\n");
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<Task>**](Task.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **updateTask**
> Task updateTask(id, body)
Update an existing task
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new TaskApi();
var id = id_example; // String | ID of task to update
var body = new Task(); // Task |
try {
var result = api_instance.updateTask(id, body);
print(result);
} catch (e) {
print("Exception when calling TaskApi->updateTask: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of task to update |
**body** | [**Task**](Task.md)| |
### Return type
[**Task**](Task.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# swagger.model.User
## Load the model package
```dart
import 'package:swagger/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [default to null]
**firstName** | **String** | | [optional] [default to null]
**lastName** | **String** | | [optional] [default to null]
**email** | **String** | | [optional] [default to null]
**password** | **String** | | [optional] [default to null]
**sessionToken** | **String** | | [optional] [default to null]
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
# swagger.model.WeeklyRoutine
## Load the model package
```dart
import 'package:swagger/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional] [default to null]
**routinePlanId** | **String** | | [optional] [default to null]
**subjectId** | **String** | | [optional] [default to null]
**year** | **String** | | [optional] [default to null]
**weekNumber** | **int** | | [optional] [default to null]
**days** | [**List&lt;RoutineDay&gt;**](RoutineDay.md) | | [optional] [default to []]
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
# swagger.api.WeeklyRoutineApi
## Load the API package
```dart
import 'package:swagger/api.dart';
```
All URIs are relative to *https://petstore.swagger.io/localhost:8080*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addWeeklyRoutine**](WeeklyRoutineApi.md#addWeeklyRoutine) | **POST** /weekly_routine | Add a weekly routine
[**deleteWeeklyRoutine**](WeeklyRoutineApi.md#deleteWeeklyRoutine) | **DELETE** /weekly_routine/{id} | Deletes a weekly routine
[**findWeeklyRoutineByID**](WeeklyRoutineApi.md#findWeeklyRoutineByID) | **GET** /weekly_routine/{id} | Finds weekly routine by id
[**getAllWeeklyRoutine**](WeeklyRoutineApi.md#getAllWeeklyRoutine) | **GET** /weekly_routine | Returns all weekly routines
[**updateWeeklyRoutine**](WeeklyRoutineApi.md#updateWeeklyRoutine) | **PUT** /weekly_routine/{id} | Update an existing weekly routine
# **addWeeklyRoutine**
> addWeeklyRoutine(body)
Add a weekly routine
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new WeeklyRoutineApi();
var body = new WeeklyRoutine(); // WeeklyRoutine |
try {
api_instance.addWeeklyRoutine(body);
} catch (e) {
print("Exception when calling WeeklyRoutineApi->addWeeklyRoutine: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**WeeklyRoutine**](WeeklyRoutine.md)| |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **deleteWeeklyRoutine**
> deleteWeeklyRoutine(id)
Deletes a weekly routine
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new WeeklyRoutineApi();
var id = id_example; // String | ID of weekly routine to delete
try {
api_instance.deleteWeeklyRoutine(id);
} catch (e) {
print("Exception when calling WeeklyRoutineApi->deleteWeeklyRoutine: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of weekly routine to delete |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **findWeeklyRoutineByID**
> WeeklyRoutine findWeeklyRoutineByID(id)
Finds weekly routine by id
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new WeeklyRoutineApi();
var id = id_example; // String | ID of weekly routine to return
try {
var result = api_instance.findWeeklyRoutineByID(id);
print(result);
} catch (e) {
print("Exception when calling WeeklyRoutineApi->findWeeklyRoutineByID: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of weekly routine to return |
### Return type
[**WeeklyRoutine**](WeeklyRoutine.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **getAllWeeklyRoutine**
> List<WeeklyRoutine> getAllWeeklyRoutine()
Returns all weekly routines
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new WeeklyRoutineApi();
try {
var result = api_instance.getAllWeeklyRoutine();
print(result);
} catch (e) {
print("Exception when calling WeeklyRoutineApi->getAllWeeklyRoutine: $e\n");
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<WeeklyRoutine>**](WeeklyRoutine.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
# **updateWeeklyRoutine**
> WeeklyRoutine updateWeeklyRoutine(id, body)
Update an existing weekly routine
### Example
```dart
import 'package:swagger/api.dart';
var api_instance = new WeeklyRoutineApi();
var id = id_example; // String | ID of weekly routine to update
var body = new WeeklyRoutine(); // WeeklyRoutine |
try {
var result = api_instance.updateWeeklyRoutine(id, body);
print(result);
} catch (e) {
print("Exception when calling WeeklyRoutineApi->updateWeeklyRoutine: $e\n");
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| ID of weekly routine to update |
**body** | [**WeeklyRoutine**](WeeklyRoutine.md)| |
### Return type
[**WeeklyRoutine**](WeeklyRoutine.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
import 'package:flutter/material.dart';
class AdditionalInfo {
String name;
int rating;
AdditionalInfo({@required this.name, @required this.rating});
@override
String toString() {
return 'AdditionalInfo[name=$name, rating=$rating, ]';
}
AdditionalInfo.fromJson(Map<String, dynamic> json) {
if (json == null) return;
name = json['name'];
rating = json['rating'];
}
Map<String, dynamic> toJson() {
return {'name': name, 'rating': rating};
}
static List<AdditionalInfo> listFromJson(List<dynamic> json) {
return json == null
? new List<AdditionalInfo>()
: json.map((value) => new AdditionalInfo.fromJson(value)).toList();
}
static Map<String, AdditionalInfo> mapFromJson(
Map<String, Map<String, dynamic>> json) {
var map = new Map<String, AdditionalInfo>();
if (json != null && json.length > 0) {
json.forEach((String key, Map<String, dynamic> value) =>
map[key] = new AdditionalInfo.fromJson(value));
}
return map;
}
}
import 'package:flutter/material.dart';
import 'package:objectid/objectid.dart';
class Mood {
String id;
String name;
Mood({@required this.name}) {
this.id = ObjectId().toString();
}
@override
String toString() {
return 'Mood[id=$id, name=$name, ]';
}
Mood.fromJson(Map<String, dynamic> json) {
if (json == null) return;
id = json['id'];
name = json['name'];
}
Map<String, dynamic> toJson() {
return {'id': id, 'name': name};
}
static List<Mood> listFromJson(List<dynamic> json) {
return json == null
? []
: json.map((value) => new Mood.fromJson(value)).toList();
}
static Map<String, Mood> mapFromJson(Map<String, Map<String, dynamic>> json) {
var map = new Map<String, Mood>();
if (json != null && json.length > 0) {
json.forEach((String key, Map<String, dynamic> value) =>
map[key] = new Mood.fromJson(value));
}
return map;
}
}
import 'package:flutter/material.dart';
import 'package:objectid/objectid.dart';
import 'additional_info.dart';
import 'mood.dart';
class RoutineData {
String id;
String routineId;
String userId;
List<Mood> moods = [];
List<AdditionalInfo> additionalInfo = [];
String dayDescription;
RoutineData(
{@required this.routineId,
@required this.userId,
@required this.moods,
this.additionalInfo,
this.dayDescription}) {
this.id = ObjectId().toString();
}
@override
String toString() {
return 'RoutineData[id=$id, routineId=$routineId, userId=$userId, moods=$moods, additionalInfo=$additionalInfo, dayDescription=$dayDescription, ]';
}
RoutineData.fromJson(Map<String, dynamic> json) {
if (json == null) return;
id = json['id'];
routineId = json['routine_id'];
userId = json['user_id'];
moods = Mood.listFromJson(json['moods']);
additionalInfo = AdditionalInfo.listFromJson(json['additionalInfo']);
dayDescription = json['day_description'];
}
Map<String, dynamic> toJson() {
return {
'id': id,
'routine_id': routineId,
'user_id': userId,
'moods': moods,
'additionalInfo': additionalInfo,
'day_description': dayDescription
};
}
static List<RoutineData> listFromJson(List<dynamic> json) {
return json == null
? new List<RoutineData>()
: json.map((value) => new RoutineData.fromJson(value)).toList();
}
static Map<String, RoutineData> mapFromJson(
Map<String, Map<String, dynamic>> json) {
var map = new Map<String, RoutineData>();
if (json != null && json.length > 0) {
json.forEach((String key, Map<String, dynamic> value) =>
map[key] = new RoutineData.fromJson(value));
}
return map;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment