deleteComment
/api/v1/comments/{id}
Usage and SDK Samples
curl -X DELETE \
-H "Accept: */*" \
"http://localhost:8081/api/v1/comments/{id}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CommentRestControllerApi;
import java.io.File;
import java.util.*;
public class CommentRestControllerApiExample {
public static void main(String[] args) {
// Create an instance of the API class
CommentRestControllerApi apiInstance = new CommentRestControllerApi();
Long id = 789; // Long |
try {
Object result = apiInstance.deleteComment(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommentRestControllerApi#deleteComment");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final Long id = new Long(); // Long |
try {
final result = await api_instance.deleteComment(id);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->deleteComment: $e\n');
}
import org.openapitools.client.api.CommentRestControllerApi;
public class CommentRestControllerApiExample {
public static void main(String[] args) {
CommentRestControllerApi apiInstance = new CommentRestControllerApi();
Long id = 789; // Long |
try {
Object result = apiInstance.deleteComment(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommentRestControllerApi#deleteComment");
e.printStackTrace();
}
}
}
// Create an instance of the API class
CommentRestControllerApi *apiInstance = [[CommentRestControllerApi alloc] init];
Long *id = 789; // (default to null)
[apiInstance deleteCommentWith:id
completionHandler: ^(Object output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OpenApiDefinition = require('open_api_definition');
// Create an instance of the API class
var api = new OpenApiDefinition.CommentRestControllerApi()
var id = 789; // {Long}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.deleteComment(id, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class deleteCommentExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new CommentRestControllerApi();
var id = 789; // Long | (default to null)
try {
Object result = apiInstance.deleteComment(id);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling CommentRestControllerApi.deleteComment: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CommentRestControllerApi();
$id = 789; // Long |
try {
$result = $api_instance->deleteComment($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommentRestControllerApi->deleteComment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CommentRestControllerApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CommentRestControllerApi->new();
my $id = 789; # Long |
eval {
my $result = $api_instance->deleteComment(id => $id);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CommentRestControllerApi->deleteComment: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.CommentRestControllerApi()
id = 789 # Long | (default to null)
try:
api_response = api_instance.delete_comment(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommentRestControllerApi->deleteComment: %s\n" % e)
extern crate CommentRestControllerApi;
pub fn main() {
let id = 789; // Long
let mut context = CommentRestControllerApi::Context::default();
let result = client.deleteComment(id, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
| Name | Description |
|---|---|
| id* |
Long
(int64)
Required
|