myhomie_app/mycore_api/doc/BooksApi.md

5.4 KiB

mycore_api.api.BooksApi

Load the API package

import 'package:mycore_api/api.dart';

All URIs are relative to http://localhost:25049

Method HTTP request Description
booksCreate POST /api/books
booksDelete DELETE /api/books/{id}
booksGet GET /api/books/{id}
booksGetAll GET /api/books
booksUpdate PUT /api/books/{id}

booksCreate

Book booksCreate(book)

Example

import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = BooksApi();
final book = Book(); // Book | 

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

Parameters

Name Type Description Notes
book Book

Return type

Book

Authorization

bearer

HTTP request headers

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

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

booksDelete

MultipartFile booksDelete(id)

Example

import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = BooksApi();
final id = id_example; // String | 

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

Parameters

Name Type Description Notes
id String

Return type

MultipartFile

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

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

booksGet

Book booksGet(id)

Example

import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = BooksApi();
final id = id_example; // String | 

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

Parameters

Name Type Description Notes
id String

Return type

Book

Authorization

bearer

HTTP request headers

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

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

booksGetAll

List booksGetAll()

Example

import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = BooksApi();

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

Parameters

This endpoint does not need any parameter.

Return type

List

Authorization

bearer

HTTP request headers

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

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

booksUpdate

MultipartFile booksUpdate(id, book)

Example

import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';

final api_instance = BooksApi();
final id = id_example; // String | 
final book = Book(); // Book | 

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

Parameters

Name Type Description Notes
id String
book Book

Return type

MultipartFile

Authorization

bearer

HTTP request headers

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

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