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.
 
 

10 KiB

openapi.api.DefaultApi

Load the API package

import 'package:openapi/api.dart';

All URIs are relative to https://localhost:8080/apps/notes

Method HTTP request Description
createNote POST /api/v1/notes
deleteNote DELETE /api/v1/notes/{id}
getNote GET /api/v1/notes/{id}
getNotes GET /api/v1/notes
getSettings GET /api/v1/settings
updateNote PUT /api/v1/notes/{id}
updateSettings PUT /api/v1/settings

createNote

NotesNote createNote(category, title, content, modified, favorite)

Example

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 | 

try {
    final result = api_instance.createNote(category, title, content, modified, favorite);
    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]

Return type

NotesNote

Authorization

basic_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteNote

String deleteNote(id)

Example

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);
    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

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getNote

NotesNote getNote(id, exclude, ifNoneMatch)

Example

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 | 
final ifNoneMatch = ifNoneMatch_example; // String | 

try {
    final result = api_instance.getNote(id, exclude, ifNoneMatch);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getNote: $e\n');
}

Parameters

Name Type Description Notes
id int
exclude String [optional] [default to '']
ifNoneMatch String [optional]

Return type

NotesNote

Authorization

basic_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getNotes

List getNotes(category, exclude, pruneBefore, chunkSize, chunkCursor, ifNoneMatch)

Example

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 | 
final ifNoneMatch = ifNoneMatch_example; // String | 

try {
    final result = api_instance.getNotes(category, exclude, pruneBefore, chunkSize, chunkCursor, ifNoneMatch);
    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]
ifNoneMatch String [optional]

Return type

List

Authorization

basic_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSettings

NotesSettings getSettings()

Example

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

Authorization

basic_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateNote

NotesNote updateNote(id, content, modified, title, category, favorite, ifMatch)

Example

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 | 
final ifMatch = ifMatch_example; // String | 

try {
    final result = api_instance.updateNote(id, content, modified, title, category, favorite, ifMatch);
    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]
ifMatch String [optional]

Return type

NotesNote

Authorization

basic_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateSettings

NotesSettings updateSettings(notesSettings)

Example

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

Return type

NotesSettings

Authorization

basic_auth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]