APIsApi | R Documentation |
singlearity.APIs
An R6Class
generator object
GetGameSim Get Game Sim
@param body.get.game.sim.game.sim.post BodyGetGameSimGameSimPost
@param num.sims integer
@returnType list( GameSimResults )
status code : 200 | Successful Response
return type : array[GameSimResults]
response headers :
status code : 422 | Validation Error
return type : HTTPValidationError
response headers :
GetPaSim Get Pa Sim
@param matchup list( Matchup )
@param return.features character
@param model.name character
status code : 200 | Successful Response
return type : object
response headers :
status code : 422 | Validation Error
return type : HTTPValidationError
response headers :
GetPlayers Get Players
@param name character
@param id integer
@param team.name character
@param team.id integer
@param position list( character )
@param age.min integer
@param age.max integer
@param pitch.hand list( character )
@param bat.side list( character )
@param active character
@param on.40 character
@returnType list( Player )
status code : 200 | Successful Response
return type : array[Player]
response headers :
status code : 422 | Validation Error
return type : HTTPValidationError
response headers :
GetTeams Get Teams
@param name character
@returnType list( Team )
status code : 200 | Successful Response
return type : array[Team]
response headers :
status code : 422 | Validation Error
return type : HTTPValidationError
response headers :
GetVenues Get Venues
@param stadium.name character
@param team.name character
@returnType list( Venue )
status code : 200 | Successful Response
return type : array[Venue]
response headers :
status code : 422 | Validation Error
return type : HTTPValidationError
response headers :
Hello Hello
status code : 200 | Successful Response
return type : object
response headers :
HelloWithKey Hello With Key
status code : 200 | Successful Response
return type : object
response headers :
apiClient
Handles the client-server communication.
new()
APIsApi$new(apiClient)
GetGameSim()
APIsApi$GetGameSim(body.get.game.sim.game.sim.post, num.sims = 100, ...)
GetGameSimWithHttpInfo()
APIsApi$GetGameSimWithHttpInfo( body.get.game.sim.game.sim.post, num.sims = 100, ... )
GetPaSim()
APIsApi$GetPaSim(matchup, return.features = FALSE, model.name = NULL, ...)
GetPaSimWithHttpInfo()
APIsApi$GetPaSimWithHttpInfo( matchup, return.features = FALSE, model.name = NULL, ... )
GetPlayers()
APIsApi$GetPlayers( name = NULL, id = NULL, team.name = NULL, team.id = NULL, position = NULL, age.min = NULL, age.max = NULL, pitch.hand = NULL, bat.side = NULL, active = NULL, on.40 = NULL, ... )
GetPlayersWithHttpInfo()
APIsApi$GetPlayersWithHttpInfo( name = NULL, id = NULL, team.name = NULL, team.id = NULL, position = NULL, age.min = NULL, age.max = NULL, pitch.hand = NULL, bat.side = NULL, active = NULL, on.40 = NULL, ... )
GetTeams()
APIsApi$GetTeams(name = NULL, ...)
GetTeamsWithHttpInfo()
APIsApi$GetTeamsWithHttpInfo(name = NULL, ...)
GetVenues()
APIsApi$GetVenues(stadium.name = NULL, team.name = NULL, ...)
GetVenuesWithHttpInfo()
APIsApi$GetVenuesWithHttpInfo(stadium.name = NULL, team.name = NULL, ...)
Hello()
APIsApi$Hello(...)
HelloWithHttpInfo()
APIsApi$HelloWithHttpInfo(...)
HelloWithKey()
APIsApi$HelloWithKey(...)
HelloWithKeyWithHttpInfo()
APIsApi$HelloWithKeyWithHttpInfo(...)
clone()
The objects of this class are cloneable with this method.
APIsApi$clone(deep = FALSE)
deep
Whether to make a deep clone.
## Not run: #################### GetGameSim #################### library(singlearity) var.body.get.game.sim.game.sim.post <- BodyGetGameSimGameSimPost$new() # BodyGetGameSimGameSimPost | var.num.sims <- 100 # integer | #Get Game Sim api.instance <- APIsApi$new() #Configure API key authorization: APIKeyHeader api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; #Configure API key authorization: APIKeyQuery api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; result <- api.instance$GetGameSim(var.body.get.game.sim.game.sim.post, num.sims=var.num.sims) #################### GetPaSim #################### library(singlearity) var.matchup <- [Matchup$new()] # array[Matchup] | var.return.features <- FALSE # character | var.model.name <- 'model.name_example' # character | #Get Pa Sim api.instance <- APIsApi$new() #Configure API key authorization: APIKeyHeader api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; #Configure API key authorization: APIKeyQuery api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; result <- api.instance$GetPaSim(var.matchup, return.features=var.return.features, model.name=var.model.name) #################### GetPlayers #################### library(singlearity) var.name <- 'name_example' # character | var.id <- 56 # integer | var.team.name <- 'team.name_example' # character | var.team.id <- 56 # integer | var.position <- ['position_example'] # array[character] | var.age.min <- 56 # integer | var.age.max <- 56 # integer | var.pitch.hand <- ['pitch.hand_example'] # array[character] | var.bat.side <- ['bat.side_example'] # array[character] | var.active <- 'active_example' # character | var.on.40 <- 'on.40_example' # character | #Get Players api.instance <- APIsApi$new() #Configure API key authorization: APIKeyHeader api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; #Configure API key authorization: APIKeyQuery api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; result <- api.instance$GetPlayers(name=var.name, id=var.id, team.name=var.team.name, team.id=var.team.id, position=var.position, age.min=var.age.min, age.max=var.age.max, pitch.hand=var.pitch.hand, bat.side=var.bat.side, active=var.active, on.40=var.on.40) #################### GetTeams #################### library(singlearity) var.name <- 'name_example' # character | #Get Teams api.instance <- APIsApi$new() #Configure API key authorization: APIKeyHeader api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; #Configure API key authorization: APIKeyQuery api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; result <- api.instance$GetTeams(name=var.name) #################### GetVenues #################### library(singlearity) var.stadium.name <- 'stadium.name_example' # character | var.team.name <- 'team.name_example' # character | #Get Venues api.instance <- APIsApi$new() #Configure API key authorization: APIKeyHeader api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; #Configure API key authorization: APIKeyQuery api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; result <- api.instance$GetVenues(stadium.name=var.stadium.name, team.name=var.team.name) #################### Hello #################### library(singlearity) #Hello api.instance <- APIsApi$new() result <- api.instance$Hello() #################### HelloWithKey #################### library(singlearity) #Hello With Key api.instance <- APIsApi$new() #Configure API key authorization: APIKeyHeader api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; #Configure API key authorization: APIKeyQuery api.instance$apiClient$apiKeys['SINGLEARITY_API_KEY'] <- 'TODO_YOUR_API_KEY'; result <- api.instance$HelloWithKey() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.