open-project-flutter-api/doc/TypesApi.md
2023-11-05 19:54:17 +01:00

3.9 KiB

openapi.api.TypesApi

Load the API package

import 'package:openapi/api.dart';

All URIs are relative to https://community.openproject.org

Method HTTP request Description
listAllTypes GET /api/v3/types List all Types
listTypesAvailableInAProject GET /api/v3/projects/{id}/types List types available in a project
viewType GET /api/v3/types/{id} View Type

listAllTypes

Object listAllTypes()

List all Types

Example

import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: BasicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('BasicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('BasicAuth').password = 'YOUR_PASSWORD';

final api_instance = TypesApi();

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

Parameters

This endpoint does not need any parameter.

Return type

Object

Authorization

BasicAuth

HTTP request headers

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

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

listTypesAvailableInAProject

Object listTypesAvailableInAProject(id)

List types available in a project

This endpoint lists the types that are available in a given project.

Example

import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: BasicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('BasicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('BasicAuth').password = 'YOUR_PASSWORD';

final api_instance = TypesApi();
final id = 1; // int | ID of the project whose types will be listed

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

Parameters

Name Type Description Notes
id int ID of the project whose types will be listed

Return type

Object

Authorization

BasicAuth

HTTP request headers

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

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

viewType

TypeModel viewType(id)

View Type

Example

import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: BasicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('BasicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('BasicAuth').password = 'YOUR_PASSWORD';

final api_instance = TypesApi();
final id = 1; // int | Type id

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

Parameters

Name Type Description Notes
id int Type id

Return type

TypeModel

Authorization

BasicAuth

HTTP request headers

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

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