mirror of
https://github.com/gosticks/open-project-flutter-api.git
synced 2025-10-16 11:55:34 +00:00
2.8 KiB
2.8 KiB
openapi.api.CategoriesApi
Load the API package
import 'package:openapi/api.dart';
All URIs are relative to https://community.openproject.org
| Method | HTTP request | Description |
|---|---|---|
| listCategoriesOfAProject | GET /api/v3/projects/{id}/categories | List categories of a project |
| viewCategory | GET /api/v3/categories/{id} | View Category |
listCategoriesOfAProject
Object listCategoriesOfAProject(id)
List categories of a 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 = CategoriesApi();
final id = 1; // int | ID of the project whose categories will be listed
try {
final result = api_instance.listCategoriesOfAProject(id);
print(result);
} catch (e) {
print('Exception when calling CategoriesApi->listCategoriesOfAProject: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | ID of the project whose categories 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]
viewCategory
CategoryModel viewCategory(id)
View Category
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 = CategoriesApi();
final id = 1; // int | Category id
try {
final result = api_instance.viewCategory(id);
print(result);
} catch (e) {
print('Exception when calling CategoriesApi->viewCategory: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Category 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]