# 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
#' GamePPAOffense Class
#'
#' @field overall
#' @field passing
#' @field rushing
#' @field firstDown
#' @field secondDown
#' @field thirdDown
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
GamePPAOffense <- R6::R6Class(
'GamePPAOffense',
public = list(
`overall` = NULL,
`passing` = NULL,
`rushing` = NULL,
`firstDown` = NULL,
`secondDown` = NULL,
`thirdDown` = NULL,
initialize = function(`overall`, `passing`, `rushing`, `firstDown`, `secondDown`, `thirdDown`){
if (!missing(`overall`)) {
self$`overall` <- `overall`
}
if (!missing(`passing`)) {
self$`passing` <- `passing`
}
if (!missing(`rushing`)) {
self$`rushing` <- `rushing`
}
if (!missing(`firstDown`)) {
self$`firstDown` <- `firstDown`
}
if (!missing(`secondDown`)) {
self$`secondDown` <- `secondDown`
}
if (!missing(`thirdDown`)) {
self$`thirdDown` <- `thirdDown`
}
},
toJSON = function() {
GamePPAOffenseObject <- list()
if (!is.null(self$`overall`)) {
GamePPAOffenseObject[['overall']] <- self$`overall`
}
if (!is.null(self$`passing`)) {
GamePPAOffenseObject[['passing']] <- self$`passing`
}
if (!is.null(self$`rushing`)) {
GamePPAOffenseObject[['rushing']] <- self$`rushing`
}
if (!is.null(self$`firstDown`)) {
GamePPAOffenseObject[['firstDown']] <- self$`firstDown`
}
if (!is.null(self$`secondDown`)) {
GamePPAOffenseObject[['secondDown']] <- self$`secondDown`
}
if (!is.null(self$`thirdDown`)) {
GamePPAOffenseObject[['thirdDown']] <- self$`thirdDown`
}
GamePPAOffenseObject
},
fromJSON = function(GamePPAOffenseJson) {
GamePPAOffenseObject <- jsonlite::fromJSON(GamePPAOffenseJson)
if (!is.null(GamePPAOffenseObject$`overall`)) {
self$`overall` <- GamePPAOffenseObject$`overall`
}
if (!is.null(GamePPAOffenseObject$`passing`)) {
self$`passing` <- GamePPAOffenseObject$`passing`
}
if (!is.null(GamePPAOffenseObject$`rushing`)) {
self$`rushing` <- GamePPAOffenseObject$`rushing`
}
if (!is.null(GamePPAOffenseObject$`firstDown`)) {
self$`firstDown` <- GamePPAOffenseObject$`firstDown`
}
if (!is.null(GamePPAOffenseObject$`secondDown`)) {
self$`secondDown` <- GamePPAOffenseObject$`secondDown`
}
if (!is.null(GamePPAOffenseObject$`thirdDown`)) {
self$`thirdDown` <- GamePPAOffenseObject$`thirdDown`
}
},
toJSONString = function() {
sprintf(
'{
"overall": %s,
"passing": %s,
"rushing": %s,
"firstDown": %s,
"secondDown": %s,
"thirdDown": %s
}',
self$`overall`,
self$`passing`,
self$`rushing`,
self$`firstDown`,
self$`secondDown`,
self$`thirdDown`
)
},
fromJSONString = function(GamePPAOffenseJson) {
GamePPAOffenseObject <- jsonlite::fromJSON(GamePPAOffenseJson)
self$`overall` <- GamePPAOffenseObject$`overall`
self$`passing` <- GamePPAOffenseObject$`passing`
self$`rushing` <- GamePPAOffenseObject$`rushing`
self$`firstDown` <- GamePPAOffenseObject$`firstDown`
self$`secondDown` <- GamePPAOffenseObject$`secondDown`
self$`thirdDown` <- GamePPAOffenseObject$`thirdDown`
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.