APIsApi: APIs operations

APIsApiR Documentation

APIs operations

Description

singlearity.APIs

Format

An R6Class generator object

Methods

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 :

Public fields

apiClient

Handles the client-server communication.

Methods

Public methods


Method new()

Usage
APIsApi$new(apiClient)

Method GetGameSim()

Usage
APIsApi$GetGameSim(body.get.game.sim.game.sim.post, num.sims = 100, ...)

Method GetGameSimWithHttpInfo()

Usage
APIsApi$GetGameSimWithHttpInfo(
  body.get.game.sim.game.sim.post,
  num.sims = 100,
  ...
)

Method GetPaSim()

Usage
APIsApi$GetPaSim(matchup, return.features = FALSE, model.name = NULL, ...)

Method GetPaSimWithHttpInfo()

Usage
APIsApi$GetPaSimWithHttpInfo(
  matchup,
  return.features = FALSE,
  model.name = NULL,
  ...
)

Method GetPlayers()

Usage
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,
  ...
)

Method GetPlayersWithHttpInfo()

Usage
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,
  ...
)

Method GetTeams()

Usage
APIsApi$GetTeams(name = NULL, ...)

Method GetTeamsWithHttpInfo()

Usage
APIsApi$GetTeamsWithHttpInfo(name = NULL, ...)

Method GetVenues()

Usage
APIsApi$GetVenues(stadium.name = NULL, team.name = NULL, ...)

Method GetVenuesWithHttpInfo()

Usage
APIsApi$GetVenuesWithHttpInfo(stadium.name = NULL, team.name = NULL, ...)

Method Hello()

Usage
APIsApi$Hello(...)

Method HelloWithHttpInfo()

Usage
APIsApi$HelloWithHttpInfo(...)

Method HelloWithKey()

Usage
APIsApi$HelloWithKey(...)

Method HelloWithKeyWithHttpInfo()

Usage
APIsApi$HelloWithKeyWithHttpInfo(...)

Method clone()

The objects of this class are cloneable with this method.

Usage
APIsApi$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

## 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)

singlearity-sports/singlearity-R documentation built on April 21, 2022, 3:48 a.m.