curl -X PUT \
-H "Accept: */*" \
-H "Content-Type: application/json" \
"http://localhost:8080/api/v1/matches/{id}" \
-d '{
"date" : "2000-01-23T04:56:07.000+00:00",
"modeSelected" : 6,
"team2Players" : [ {
"password" : "password",
"gender" : true,
"level" : 6.0274563,
"stats" : {
"wins" : 5,
"draws" : 5,
"winRate" : 7.061401241503109,
"totalMatches" : 1,
"losses" : 2
},
"roles" : [ "roles", "roles" ],
"description" : "description",
"id" : 0,
"birthDate" : "2000-01-23T04:56:07.000+00:00",
"email" : "email",
"realname" : "realname",
"username" : "username"
}, {
"password" : "password",
"gender" : true,
"level" : 6.0274563,
"stats" : {
"wins" : 5,
"draws" : 5,
"winRate" : 7.061401241503109,
"totalMatches" : 1,
"losses" : 2
},
"roles" : [ "roles", "roles" ],
"description" : "description",
"id" : 0,
"birthDate" : "2000-01-23T04:56:07.000+00:00",
"email" : "email",
"realname" : "realname",
"username" : "username"
} ],
"team1Players" : [ {
"password" : "password",
"gender" : true,
"level" : 6.0274563,
"stats" : {
"wins" : 5,
"draws" : 5,
"winRate" : 7.061401241503109,
"totalMatches" : 1,
"losses" : 2
},
"roles" : [ "roles", "roles" ],
"description" : "description",
"id" : 0,
"birthDate" : "2000-01-23T04:56:07.000+00:00",
"email" : "email",
"realname" : "realname",
"username" : "username"
}, {
"password" : "password",
"gender" : true,
"level" : 6.0274563,
"stats" : {
"wins" : 5,
"draws" : 5,
"winRate" : 7.061401241503109,
"totalMatches" : 1,
"losses" : 2
},
"roles" : [ "roles", "roles" ],
"description" : "description",
"id" : 0,
"birthDate" : "2000-01-23T04:56:07.000+00:00",
"email" : "email",
"realname" : "realname",
"username" : "username"
} ],
"isPrivate" : true,
"type" : true,
"result" : {
"team1Score" : 7,
"team1Name" : "team1Name",
"team1Sets" : 3,
"team2Name" : "team2Name",
"team2Sets" : 2,
"team2Score" : 9,
"team1GamesPerSet" : [ 4, 4 ],
"team2GamesPerSet" : [ 7, 7 ]
},
"organizer" : {
"level" : 5.962134,
"id" : 1,
"realname" : "realname",
"username" : "username"
},
"price" : 5.637377,
"club" : {
"city" : "city",
"name" : "name",
"id" : 2
},
"id" : 0,
"state" : true,
"sport" : {
"modes" : [ {
"name" : "name",
"playersPerGame" : 6
}, {
"name" : "name",
"playersPerGame" : 6
} ],
"scoringType" : "SCORE",
"name" : "name",
"id" : 0
}
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.MatchRestControllerApi;
import java.io.File;
import java.util.*;
public class MatchRestControllerApiExample {
public static void main(String[] args) {
// Create an instance of the API class
MatchRestControllerApi apiInstance = new MatchRestControllerApi();
Long id = 789; // Long |
MatchDTO matchDTO = ; // MatchDTO |
try {
MatchDTO result = apiInstance.replaceMatch(id, matchDTO);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MatchRestControllerApi#replaceMatch");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final Long id = new Long(); // Long |
final MatchDTO matchDTO = new MatchDTO(); // MatchDTO |
try {
final result = await api_instance.replaceMatch(id, matchDTO);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->replaceMatch: $e\n');
}
import org.openapitools.client.api.MatchRestControllerApi;
public class MatchRestControllerApiExample {
public static void main(String[] args) {
MatchRestControllerApi apiInstance = new MatchRestControllerApi();
Long id = 789; // Long |
MatchDTO matchDTO = ; // MatchDTO |
try {
MatchDTO result = apiInstance.replaceMatch(id, matchDTO);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MatchRestControllerApi#replaceMatch");
e.printStackTrace();
}
}
}
// Create an instance of the API class
MatchRestControllerApi *apiInstance = [[MatchRestControllerApi alloc] init];
Long *id = 789; // (default to null)
MatchDTO *matchDTO = ; //
[apiInstance replaceMatchWith:id
matchDTO:matchDTO
completionHandler: ^(MatchDTO 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.MatchRestControllerApi()
var id = 789; // {Long}
var matchDTO = ; // {MatchDTO}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.replaceMatch(id, matchDTO, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class replaceMatchExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new MatchRestControllerApi();
var id = 789; // Long | (default to null)
var matchDTO = new MatchDTO(); // MatchDTO |
try {
MatchDTO result = apiInstance.replaceMatch(id, matchDTO);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling MatchRestControllerApi.replaceMatch: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\MatchRestControllerApi();
$id = 789; // Long |
$matchDTO = ; // MatchDTO |
try {
$result = $api_instance->replaceMatch($id, $matchDTO);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MatchRestControllerApi->replaceMatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::MatchRestControllerApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::MatchRestControllerApi->new();
my $id = 789; # Long |
my $matchDTO = WWW::OPenAPIClient::Object::MatchDTO->new(); # MatchDTO |
eval {
my $result = $api_instance->replaceMatch(id => $id, matchDTO => $matchDTO);
print Dumper($result);
};
if ($@) {
warn "Exception when calling MatchRestControllerApi->replaceMatch: $@\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.MatchRestControllerApi()
id = 789 # Long | (default to null)
matchDTO = # MatchDTO |
try:
api_response = api_instance.replace_match(id, matchDTO)
pprint(api_response)
except ApiException as e:
print("Exception when calling MatchRestControllerApi->replaceMatch: %s\n" % e)
extern crate MatchRestControllerApi;
pub fn main() {
let id = 789; // Long
let matchDTO = ; // MatchDTO
let mut context = MatchRestControllerApi::Context::default();
let result = client.replaceMatch(id, matchDTO, &context).wait();
println!("{:?}", result);
}