8.0 KiB

managerapi.api.ResourceApi

Load the API package

import 'package:managerapi/api.dart';

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

Method HTTP request Description
resourceCreate POST /api/Resource
resourceDelete DELETE /api/Resource/{id}
resourceGet GET /api/Resource
resourceGetDetail GET /api/Resource/{id}/detail
resourceShow GET /api/Resource/{id}
resourceUpdate PUT /api/Resource
resourceUpload POST /api/Resource/upload

resourceCreate

ResourceDTO resourceCreate(resourceDTO)

Example

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

final api_instance = ResourceApi();
final resourceDTO = ResourceDTO(); // ResourceDTO | 

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

Parameters

Name Type Description Notes
resourceDTO ResourceDTO

Return type

ResourceDTO

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]

resourceDelete

String resourceDelete(id)

Example

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

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

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

Parameters

Name Type Description Notes
id String

Return type

String

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]

resourceGet

List resourceGet()

Example

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

final api_instance = ResourceApi();

try { 
    final result = api_instance.resourceGet();
    print(result);
} catch (e) {
    print('Exception when calling ResourceApi->resourceGet: $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]

resourceGetDetail

ResourceDTO resourceGetDetail(id)

Example

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

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

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

Parameters

Name Type Description Notes
id String

Return type

ResourceDTO

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]

resourceShow

MultipartFile resourceShow(id)

Example

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

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

try { 
    final result = api_instance.resourceShow(id);
    print(result);
} catch (e) {
    print('Exception when calling ResourceApi->resourceShow: $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, application/json

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

resourceUpdate

ResourceDTO resourceUpdate(resourceDTO)

Example

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

final api_instance = ResourceApi();
final resourceDTO = ResourceDTO(); // ResourceDTO | 

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

Parameters

Name Type Description Notes
resourceDTO ResourceDTO

Return type

ResourceDTO

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]

resourceUpload

String resourceUpload(label, type)

Example

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

final api_instance = ResourceApi();
final label = label_example; // String | 
final type = type_example; // String | 

try { 
    final result = api_instance.resourceUpload(label, type);
    print(result);
} catch (e) {
    print('Exception when calling ResourceApi->resourceUpload: $e\n');
}

Parameters

Name Type Description Notes
label String [optional]
type String [optional]

Return type

String

Authorization

bearer

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

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