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.
 
 

9.2 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(notesNote)

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 notesNote = NotesNote(); // NotesNote | 

try {
    final result = api_instance.createNote(notesNote);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createNote: $e\n');
}

Parameters

Name Type Description Notes
notesNote NotesNote

Return type

NotesNote

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]

deleteNote

String deleteNote(id, 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 ifNoneMatch = ifNoneMatch_example; // String | 

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

Parameters

Name Type Description Notes
id int
ifNoneMatch String [optional]

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

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

Parameters

Name Type Description Notes
id int
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, 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 ifNoneMatch = ifNoneMatch_example; // String | 

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

Parameters

Name Type Description Notes
category String [optional]
exclude String [optional]
pruneBefore int [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, notesNote, ifNoneMatch, 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 notesNote = NotesNote(); // NotesNote | 
final ifNoneMatch = ifNoneMatch_example; // String | 
final ifMatch = ifMatch_example; // String | 

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

Parameters

Name Type Description Notes
id int
notesNote NotesNote
ifNoneMatch String [optional]
ifMatch String [optional]

Return type

NotesNote

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]

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]