# College Football Data API
#
# This is an API for accessing all sorts of college football data. It currently has a wide array of data ranging from play by play to player statistics to game scores and more.
#
# OpenAPI spec version: 2.3.5
# Contact: admin@collegefootballdata.com
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' BoxScoreTeamsExplosiveness Class
#'
#' @field team
#' @field overall
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
BoxScoreTeamsExplosiveness <- R6::R6Class(
'BoxScoreTeamsExplosiveness',
public = list(
`team` = NULL,
`overall` = NULL,
initialize = function(`team`, `overall`){
if (!missing(`team`)) {
stopifnot(is.character(`team`), length(`team`) == 1)
self$`team` <- `team`
}
if (!missing(`overall`)) {
stopifnot(R6::is.R6(`overall`))
self$`overall` <- `overall`
}
},
toJSON = function() {
BoxScoreTeamsExplosivenessObject <- list()
if (!is.null(self$`team`)) {
BoxScoreTeamsExplosivenessObject[['team']] <- self$`team`
}
if (!is.null(self$`overall`)) {
BoxScoreTeamsExplosivenessObject[['overall']] <- self$`overall`$toJSON()
}
BoxScoreTeamsExplosivenessObject
},
fromJSON = function(BoxScoreTeamsExplosivenessJson) {
BoxScoreTeamsExplosivenessObject <- jsonlite::fromJSON(BoxScoreTeamsExplosivenessJson)
if (!is.null(BoxScoreTeamsExplosivenessObject$`team`)) {
self$`team` <- BoxScoreTeamsExplosivenessObject$`team`
}
if (!is.null(BoxScoreTeamsExplosivenessObject$`overall`)) {
overallObject <- BoxScoreTeamsOverall$new()
overallObject$fromJSON(jsonlite::toJSON(BoxScoreTeamsExplosivenessObject$overall, auto_unbox = TRUE))
self$`overall` <- overallObject
}
},
toJSONString = function() {
sprintf(
'{
"team": %s,
"overall": %s
}',
self$`team`,
self$`overall`$toJSON()
)
},
fromJSONString = function(BoxScoreTeamsExplosivenessJson) {
BoxScoreTeamsExplosivenessObject <- jsonlite::fromJSON(BoxScoreTeamsExplosivenessJson)
self$`team` <- BoxScoreTeamsExplosivenessObject$`team`
BoxScoreTeamsOverallObject <- BoxScoreTeamsOverall$new()
self$`overall` <- BoxScoreTeamsOverallObject$fromJSON(jsonlite::toJSON(BoxScoreTeamsExplosivenessObject$overall, auto_unbox = TRUE))
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.