postMlbQueryGame
Advanced Query Game
Allows conditional, advanced queries to be run. Provide a Game ID, a desired projection, and a condition, to receive an outcome with probability and values. Note that this is a POST request endpoint and not a GET endpoint.
/query/games/{game_id}
Usage and SDK Samples
curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://api.bakerengine.com/v2/mlb/query/games/{game_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdvancedQueryApi;
import java.io.File;
import java.util.*;
public class AdvancedQueryApiExample {
public static void main(String[] args) {
AdvancedQueryApi apiInstance = new AdvancedQueryApi();
MLBQueryRequest body = ; // MLBQueryRequest |
Integer gameId = 56; // Integer |
try {
apiInstance.postMlbQueryGame(body, gameId);
} catch (ApiException e) {
System.err.println("Exception when calling AdvancedQueryApi#postMlbQueryGame");
e.printStackTrace();
}
}
}
import io.swagger.client.api.AdvancedQueryApi;
public class AdvancedQueryApiExample {
public static void main(String[] args) {
AdvancedQueryApi apiInstance = new AdvancedQueryApi();
MLBQueryRequest body = ; // MLBQueryRequest |
Integer gameId = 56; // Integer |
try {
apiInstance.postMlbQueryGame(body, gameId);
} catch (ApiException e) {
System.err.println("Exception when calling AdvancedQueryApi#postMlbQueryGame");
e.printStackTrace();
}
}
}
MLBQueryRequest *body = ; //
Integer *gameId = 56; //
AdvancedQueryApi *apiInstance = [[AdvancedQueryApi alloc] init];
// Advanced Query Game
[apiInstance postMlbQueryGameWith:body
gameId:gameId
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var BakerMlb = require('baker_mlb');
var api = new BakerMlb.AdvancedQueryApi()
var body = ; // {{MLBQueryRequest}}
var gameId = 56; // {{Integer}}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.postMlbQueryGame(bodygameId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class postMlbQueryGameExample
{
public void main()
{
var apiInstance = new AdvancedQueryApi();
var body = new MLBQueryRequest(); // MLBQueryRequest |
var gameId = 56; // Integer |
try
{
// Advanced Query Game
apiInstance.postMlbQueryGame(body, gameId);
}
catch (Exception e)
{
Debug.Print("Exception when calling AdvancedQueryApi.postMlbQueryGame: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiAdvancedQueryApi();
$body = ; // MLBQueryRequest |
$gameId = 56; // Integer |
try {
$api_instance->postMlbQueryGame($body, $gameId);
} catch (Exception $e) {
echo 'Exception when calling AdvancedQueryApi->postMlbQueryGame: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdvancedQueryApi;
my $api_instance = WWW::SwaggerClient::AdvancedQueryApi->new();
my $body = WWW::SwaggerClient::Object::MLBQueryRequest->new(); # MLBQueryRequest |
my $gameId = 56; # Integer |
eval {
$api_instance->postMlbQueryGame(body => $body, gameId => $gameId);
};
if ($@) {
warn "Exception when calling AdvancedQueryApi->postMlbQueryGame: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.AdvancedQueryApi()
body = # MLBQueryRequest |
gameId = 56 # Integer |
try:
# Advanced Query Game
api_instance.post_mlb_query_game(body, gameId)
except ApiException as e:
print("Exception when calling AdvancedQueryApi->postMlbQueryGame: %s\n" % e)
Parameters
Path parameters
Name | Description |
---|---|
game_id* |
Integer
Required
|
Body parameters
Name | Description |
---|---|
body * |