deleteChat
Delete a chat
/api/v1/chats/{chatId}
Usage and SDK Samples
curl -X DELETE \
"https://localhost:8443/api/v1/chats/{chatId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ApiChatControllerApi;
import java.io.File;
import java.util.*;
public class ApiChatControllerApiExample {
public static void main(String[] args) {
// Create an instance of the API class
ApiChatControllerApi apiInstance = new ApiChatControllerApi();
Long chatId = 789; // Long |
try {
apiInstance.deleteChat(chatId);
} catch (ApiException e) {
System.err.println("Exception when calling ApiChatControllerApi#deleteChat");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.ApiChatControllerApi;
public class ApiChatControllerApiExample {
public static void main(String[] args) {
ApiChatControllerApi apiInstance = new ApiChatControllerApi();
Long chatId = 789; // Long |
try {
apiInstance.deleteChat(chatId);
} catch (ApiException e) {
System.err.println("Exception when calling ApiChatControllerApi#deleteChat");
e.printStackTrace();
}
}
}
// Create an instance of the API class
ApiChatControllerApi *apiInstance = [[ApiChatControllerApi alloc] init];
Long *chatId = 789; // (default to null)
// Delete a chat
[apiInstance deleteChatWith:chatId
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OpenApiDefinition = require('open_api_definition');
// Create an instance of the API class
var api = new OpenApiDefinition.ApiChatControllerApi()
var chatId = 789; // {Long}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.deleteChat(chatId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class deleteChatExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new ApiChatControllerApi();
var chatId = 789; // Long | (default to null)
try {
// Delete a chat
apiInstance.deleteChat(chatId);
} catch (Exception e) {
Debug.Print("Exception when calling ApiChatControllerApi.deleteChat: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ApiChatControllerApi();
$chatId = 789; // Long |
try {
$api_instance->deleteChat($chatId);
} catch (Exception $e) {
echo 'Exception when calling ApiChatControllerApi->deleteChat: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ApiChatControllerApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ApiChatControllerApi->new();
my $chatId = 789; # Long |
eval {
$api_instance->deleteChat(chatId => $chatId);
};
if ($@) {
warn "Exception when calling ApiChatControllerApi->deleteChat: $@\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.ApiChatControllerApi()
chatId = 789 # Long | (default to null)
try:
# Delete a chat
api_instance.delete_chat(chatId)
except ApiException as e:
print("Exception when calling ApiChatControllerApi->deleteChat: %s\n" % e)
extern crate ApiChatControllerApi;
pub fn main() {
let chatId = 789; // Long
let mut context = ApiChatControllerApi::Context::default();
let result = client.deleteChat(chatId, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Name | Description |
---|---|
chatId* |
Long
(int64)
Required
|