import 'package:openproject_dart_sdk/api.dart';
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
apiV3NewsGet | GET /api/v3/news | list news |
apiV3NewsIdGet | GET /api/v3/news/{id} | view news |
NewsList apiV3NewsGet(offset, pageSize, sortBy, filters)
list news
Lists news. The news returned depend on the provided parameters and also on the requesting user’s permissions.
import 'package:openproject_dart_sdk/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure OAuth2 access token for authorization: oAuth
//defaultApiClient.getAuthentication<OAuth>('oAuth').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = NewsApi();
final offset = 56; // int | Page number inside the requested collection.
final pageSize = 56; // int | Number of elements to display per page.
final sortBy = sortBy_example; // String | JSON specifying sort criteria. Accepts the same format as returned by the queries endpoint.
final filters = filters_example; // String | JSON specifying filter conditions. Accepts the same format as returned by the queries endpoint.
try {
final result = api_instance.apiV3NewsGet(offset, pageSize, sortBy, filters);
print(result);
} catch (e) {
print('Exception when calling NewsApi->apiV3NewsGet: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
offset | int | Page number inside the requested collection. | [optional] |
pageSize | int | Number of elements to display per page. | [optional] |
sortBy | String | JSON specifying sort criteria. Accepts the same format as returned by the queries endpoint. | [optional] |
filters | String | JSON specifying filter conditions. Accepts the same format as returned by the queries endpoint. | [optional] |
- Content-Type: Not defined
- Accept: application/json, application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
News apiV3NewsIdGet(id)
view news
import 'package:openproject_dart_sdk/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure OAuth2 access token for authorization: oAuth
//defaultApiClient.getAuthentication<OAuth>('oAuth').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = NewsApi();
final id = 56; // int | news id
try {
final result = api_instance.apiV3NewsIdGet(id);
print(result);
} catch (e) {
print('Exception when calling NewsApi->apiV3NewsIdGet: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | news id |
- Content-Type: Not defined
- Accept: application/json, application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]