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