curl -X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
"http://localhost:8443/api/matches/{id}/result" \
-d '{
"result" : [ 1, 1 ],
"setsTeamTwo" : 5,
"round" : 6,
"setsTeamOne" : 5,
"hasWinner" : true,
"winnerTeamOne" : true,
"teamTwo" : {
"userA" : {
"numWins" : 6,
"country" : "country",
"karma" : 2,
"numLoses" : 1,
"roles" : [ "roles", "roles" ],
"realName" : "realName",
"phone" : "phone",
"historicalKarma" : [ 5, 5 ],
"encodedPassword" : "encodedPassword",
"name" : "name",
"numMatchesPlayed" : 5.962133916683182,
"location" : "location",
"id" : 0,
"email" : "email",
"status" : true
},
"userB" : {
"numWins" : 6,
"country" : "country",
"karma" : 2,
"numLoses" : 1,
"roles" : [ "roles", "roles" ],
"realName" : "realName",
"phone" : "phone",
"historicalKarma" : [ 5, 5 ],
"encodedPassword" : "encodedPassword",
"name" : "name",
"numMatchesPlayed" : 5.962133916683182,
"location" : "location",
"id" : 0,
"email" : "email",
"status" : true
},
"tbd" : true,
"id" : 2
},
"id" : 0,
"tournament" : {
"owner" : "owner",
"tournamentName" : "tournamentName",
"numSignedUp" : 1,
"inscriptionDate" : "inscriptionDate",
"about" : "about",
"ruleset" : "ruleset",
"location" : "location",
"started" : true,
"id" : 0,
"rounds" : 5,
"startDate" : "startDate",
"numParticipants" : 6
},
"winnerTeamTwo" : true,
"teamOne" : {
"userA" : {
"numWins" : 6,
"country" : "country",
"karma" : 2,
"numLoses" : 1,
"roles" : [ "roles", "roles" ],
"realName" : "realName",
"phone" : "phone",
"historicalKarma" : [ 5, 5 ],
"encodedPassword" : "encodedPassword",
"name" : "name",
"numMatchesPlayed" : 5.962133916683182,
"location" : "location",
"id" : 0,
"email" : "email",
"status" : true
},
"userB" : {
"numWins" : 6,
"country" : "country",
"karma" : 2,
"numLoses" : 1,
"roles" : [ "roles", "roles" ],
"realName" : "realName",
"phone" : "phone",
"historicalKarma" : [ 5, 5 ],
"encodedPassword" : "encodedPassword",
"name" : "name",
"numMatchesPlayed" : 5.962133916683182,
"location" : "location",
"id" : 0,
"email" : "email",
"status" : true
},
"tbd" : true,
"id" : 2
}
}'
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 |
Match match = ; // Match |
try {
Match result = apiInstance.resultMatch(id, match);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MatchRestControllerApi#resultMatch");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.MatchRestControllerApi;
public class MatchRestControllerApiExample {
public static void main(String[] args) {
MatchRestControllerApi apiInstance = new MatchRestControllerApi();
Long id = 789; // Long |
Match match = ; // Match |
try {
Match result = apiInstance.resultMatch(id, match);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MatchRestControllerApi#resultMatch");
e.printStackTrace();
}
}
}
// Create an instance of the API class
MatchRestControllerApi *apiInstance = [[MatchRestControllerApi alloc] init];
Long *id = 789; // (default to null)
Match *match = ; //
// set Match's result
[apiInstance resultMatchWith:id
match:match
completionHandler: ^(Match 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 match = ; // {Match}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.resultMatch(id, match, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class resultMatchExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new MatchRestControllerApi();
var id = 789; // Long | (default to null)
var match = new Match(); // Match |
try {
// set Match's result
Match result = apiInstance.resultMatch(id, match);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling MatchRestControllerApi.resultMatch: " + 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 |
$match = ; // Match |
try {
$result = $api_instance->resultMatch($id, $match);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MatchRestControllerApi->resultMatch: ', $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 $match = WWW::OPenAPIClient::Object::Match->new(); # Match |
eval {
my $result = $api_instance->resultMatch(id => $id, match => $match);
print Dumper($result);
};
if ($@) {
warn "Exception when calling MatchRestControllerApi->resultMatch: $@\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)
match = # Match |
try:
# set Match's result
api_response = api_instance.result_match(id, match)
pprint(api_response)
except ApiException as e:
print("Exception when calling MatchRestControllerApi->resultMatch: %s\n" % e)
extern crate MatchRestControllerApi;
pub fn main() {
let id = 789; // Long
let match = ; // Match
let mut context = MatchRestControllerApi::Context::default();
let result = client.resultMatch(id, match, &context).wait();
println!("{:?}", result);
}