editComment
/api/comments/{id}
Usage and SDK Samples
curl -X PUT \
-H "Accept: */*" \
-H "Content-Type: application/json" \
"http://localhost:8443/api/comments/{id}" \
-d '{
"note" : "note",
"id" : 7,
"stars" : 9,
"film" : {
"duration" : 1,
"cast" : "cast",
"image" : true,
"similar" : [ null, null ],
"releaseDate" : "2000-01-23T04:56:07.000+00:00",
"plot" : "plot",
"averageStars" : 6.0274563,
"director" : "director",
"minAge" : "minAge",
"genre" : "ACTION",
"id" : 0,
"title" : "title"
},
"user" : {
"image" : true,
"name" : "name",
"id" : 3,
"followersCount" : 4,
"followingCount" : 2,
"email" : "email"
}
}'
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 |
Comment comment = ; // Comment |
try {
Comment result = apiInstance.editComment(id, comment);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommentRestControllerApi#editComment");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.CommentRestControllerApi;
public class CommentRestControllerApiExample {
public static void main(String[] args) {
CommentRestControllerApi apiInstance = new CommentRestControllerApi();
Long id = 789; // Long |
Comment comment = ; // Comment |
try {
Comment result = apiInstance.editComment(id, comment);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommentRestControllerApi#editComment");
e.printStackTrace();
}
}
}
// Create an instance of the API class
CommentRestControllerApi *apiInstance = [[CommentRestControllerApi alloc] init];
Long *id = 789; // (default to null)
Comment *comment = ; //
[apiInstance editCommentWith:id
comment:comment
completionHandler: ^(Comment 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 comment = ; // {Comment}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.editComment(id, comment, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class editCommentExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new CommentRestControllerApi();
var id = 789; // Long | (default to null)
var comment = new Comment(); // Comment |
try {
Comment result = apiInstance.editComment(id, comment);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling CommentRestControllerApi.editComment: " + 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 |
$comment = ; // Comment |
try {
$result = $api_instance->editComment($id, $comment);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CommentRestControllerApi->editComment: ', $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 |
my $comment = WWW::OPenAPIClient::Object::Comment->new(); # Comment |
eval {
my $result = $api_instance->editComment(id => $id, comment => $comment);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CommentRestControllerApi->editComment: $@\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)
comment = # Comment |
try:
api_response = api_instance.edit_comment(id, comment)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommentRestControllerApi->editComment: %s\n" % e)
extern crate CommentRestControllerApi;
pub fn main() {
let id = 789; // Long
let comment = ; // Comment
let mut context = CommentRestControllerApi::Context::default();
let result = client.editComment(id, comment, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Name | Description |
---|---|
id* |
Long
(int64)
Required
|
Name | Description |
---|---|
comment * |