createPosts2WithHttpInfo method
Future<Response>
createPosts2WithHttpInfo(
- String companyId,
- String postId,
- String integrationId,
- PostsInput postsInput,
Publish a post to an external platform via an integration. Args: post_id: ID of the post to publish integration_id: ID of the integration to use (from postgen_integrations) Returns: Publication record with external_url and external_post_id
Note: This method returns the HTTP Response.
Parameters:
-
String companyId (required): Unique identifier for the Company
-
String postId (required): Unique identifier for the Post
-
String integrationId (required): Unique identifier for the Integration
-
PostsInput postsInput (required):
Implementation
Future<Response> createPosts2WithHttpInfo(String companyId, String postId, String integrationId, PostsInput postsInput,) async {
// ignore: prefer_const_declarations
final path = r'/companies/{company_id}/posts/{post_id}/publish/{integration_id}'
.replaceAll('{company_id}', companyId)
.replaceAll('{post_id}', postId)
.replaceAll('{integration_id}', integrationId);
// ignore: prefer_final_locals
Object? postBody = postsInput;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}