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

1.5 KiB

openapi.api.PostsApi

Load the API package

import 'package:openapi/api.dart';

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

Method HTTP request Description
viewPost GET /api/v3/posts/{id} View Post

viewPost

PostModel viewPost(id)

View Post

Retrieve an individual post as identified by the id parameter

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 = PostsApi();
final id = 1; // int | Post's identifier

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

Parameters

Name Type Description Notes
id int Post's identifier

Return type

PostModel

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]