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