232 lines
5.4 KiB
Markdown

# mycoreapi.api.BooksApi
## Load the API package
```dart
import 'package:mycoreapi/api.dart';
```
All URIs are relative to *http://localhost:25049*
Method | HTTP request | Description
------------- | ------------- | -------------
[**booksCreate**](BooksApi.md#bookscreate) | **POST** /api/books |
[**booksDelete**](BooksApi.md#booksdelete) | **DELETE** /api/books/{id} |
[**booksGet**](BooksApi.md#booksget) | **GET** /api/books/{id} |
[**booksGetAll**](BooksApi.md#booksgetall) | **GET** /api/books |
[**booksUpdate**](BooksApi.md#booksupdate) | **PUT** /api/books/{id} |
# **booksCreate**
> Book booksCreate(book)
### Example
```dart
import 'package:mycoreapi/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**](Book.md)| |
### Return type
[**Book**](Book.md)
### Authorization
[bearer](../README.md#bearer)
### 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)
# **booksDelete**
> MultipartFile booksDelete(id)
### Example
```dart
import 'package:mycoreapi/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**](MultipartFile.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/octet-stream
[[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)
# **booksGet**
> Book booksGet(id)
### Example
```dart
import 'package:mycoreapi/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**](Book.md)
### Authorization
[bearer](../README.md#bearer)
### 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)
# **booksGetAll**
> List<Book> booksGetAll()
### Example
```dart
import 'package:mycoreapi/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<Book>**](Book.md)
### Authorization
[bearer](../README.md#bearer)
### 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)
# **booksUpdate**
> MultipartFile booksUpdate(id, book)
### Example
```dart
import 'package:mycoreapi/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**](Book.md)| |
### Return type
[**MultipartFile**](MultipartFile.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/octet-stream
[[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)