mirror of
https://github.com/gosticks/open-project-flutter-api.git
synced 2025-10-16 11:55:34 +00:00
3.9 KiB
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
Authorization
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
Authorization
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
Authorization
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]