A framework for building convergent cross-platform Nextcloud clients using Flutter.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

359 lines
10 KiB

2 years ago
# openapi.api.DefaultApi
## Load the API package
```dart
import 'package:openapi/api.dart';
```
All URIs are relative to *https://localhost:8080/apps/notes*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createNote**](DefaultApi.md#createnote) | **POST** /api/v1/notes |
[**deleteNote**](DefaultApi.md#deletenote) | **DELETE** /api/v1/notes/{id} |
[**getNote**](DefaultApi.md#getnote) | **GET** /api/v1/notes/{id} |
[**getNotes**](DefaultApi.md#getnotes) | **GET** /api/v1/notes |
[**getSettings**](DefaultApi.md#getsettings) | **GET** /api/v1/settings |
[**updateNote**](DefaultApi.md#updatenote) | **PUT** /api/v1/notes/{id} |
[**updateSettings**](DefaultApi.md#updatesettings) | **PUT** /api/v1/settings |
# **createNote**
> NotesNote createNote(category, title, content, modified, favorite)
2 years ago
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final category = category_example; // String |
final title = title_example; // String |
final content = content_example; // String |
final modified = 56; // int |
final favorite = true; // bool |
2 years ago
try {
final result = api_instance.createNote(category, title, content, modified, favorite);
2 years ago
print(result);
} catch (e) {
print('Exception when calling DefaultApi->createNote: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**category** | **String**| | [optional] [default to '']
**title** | **String**| | [optional] [default to '']
**content** | **String**| | [optional] [default to '']
**modified** | **int**| | [optional] [default to 0]
**favorite** | **bool**| | [optional] [default to false]
2 years ago
### Return type
[**NotesNote**](NotesNote.md)
### Authorization
[basic_auth](../README.md#basic_auth)
### HTTP request headers
- **Content-Type**: Not defined
2 years ago
- **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)
# **deleteNote**
> String deleteNote(id)
2 years ago
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final id = 56; // int |
try {
final result = api_instance.deleteNote(id);
2 years ago
print(result);
} catch (e) {
print('Exception when calling DefaultApi->deleteNote: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **int**| |
### Return type
**String**
### Authorization
[basic_auth](../README.md#basic_auth)
### 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)
# **getNote**
> NotesNote getNote(id, exclude, ifNoneMatch)
2 years ago
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final id = 56; // int |
final exclude = exclude_example; // String |
2 years ago
final ifNoneMatch = ifNoneMatch_example; // String |
try {
final result = api_instance.getNote(id, exclude, ifNoneMatch);
2 years ago
print(result);
} catch (e) {
print('Exception when calling DefaultApi->getNote: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **int**| |
**exclude** | **String**| | [optional] [default to '']
2 years ago
**ifNoneMatch** | **String**| | [optional]
### Return type
[**NotesNote**](NotesNote.md)
### Authorization
[basic_auth](../README.md#basic_auth)
### 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)
# **getNotes**
> List<NotesNote> getNotes(category, exclude, pruneBefore, chunkSize, chunkCursor, ifNoneMatch)
2 years ago
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final category = category_example; // String |
final exclude = exclude_example; // String |
final pruneBefore = 56; // int |
final chunkSize = 56; // int |
final chunkCursor = chunkCursor_example; // String |
2 years ago
final ifNoneMatch = ifNoneMatch_example; // String |
try {
final result = api_instance.getNotes(category, exclude, pruneBefore, chunkSize, chunkCursor, ifNoneMatch);
2 years ago
print(result);
} catch (e) {
print('Exception when calling DefaultApi->getNotes: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**category** | **String**| | [optional]
**exclude** | **String**| | [optional] [default to '']
**pruneBefore** | **int**| | [optional] [default to 0]
**chunkSize** | **int**| | [optional] [default to 0]
**chunkCursor** | **String**| | [optional]
2 years ago
**ifNoneMatch** | **String**| | [optional]
### Return type
[**List<NotesNote>**](NotesNote.md)
### Authorization
[basic_auth](../README.md#basic_auth)
### 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)
# **getSettings**
> NotesSettings getSettings()
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
try {
final result = api_instance.getSettings();
print(result);
} catch (e) {
print('Exception when calling DefaultApi->getSettings: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**NotesSettings**](NotesSettings.md)
### Authorization
[basic_auth](../README.md#basic_auth)
### 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)
# **updateNote**
> NotesNote updateNote(id, content, modified, title, category, favorite, ifMatch)
2 years ago
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final id = 56; // int |
final content = content_example; // String |
final modified = 56; // int |
final title = title_example; // String |
final category = category_example; // String |
final favorite = true; // bool |
2 years ago
final ifMatch = ifMatch_example; // String |
try {
final result = api_instance.updateNote(id, content, modified, title, category, favorite, ifMatch);
2 years ago
print(result);
} catch (e) {
print('Exception when calling DefaultApi->updateNote: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **int**| |
**content** | **String**| | [optional]
**modified** | **int**| | [optional]
**title** | **String**| | [optional]
**category** | **String**| | [optional]
**favorite** | **bool**| | [optional]
2 years ago
**ifMatch** | **String**| | [optional]
### Return type
[**NotesNote**](NotesNote.md)
### Authorization
[basic_auth](../README.md#basic_auth)
### HTTP request headers
- **Content-Type**: Not defined
2 years ago
- **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)
# **updateSettings**
> NotesSettings updateSettings(notesSettings)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basic_auth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basic_auth').password = 'YOUR_PASSWORD';
final api_instance = DefaultApi();
final notesSettings = NotesSettings(); // NotesSettings |
try {
final result = api_instance.updateSettings(notesSettings);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->updateSettings: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**notesSettings** | [**NotesSettings**](NotesSettings.md)| |
### Return type
[**NotesSettings**](NotesSettings.md)
### Authorization
[basic_auth](../README.md#basic_auth)
### 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)