# 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
#' ReturningProduction Class
#'
#' @field season
#' @field team
#' @field conference
#' @field totalPPA
#' @field totalPassingPPA
#' @field totalReceivingPPA
#' @field totalRushingPPA
#' @field percentPPA
#' @field percentPassingPPA
#' @field percentReceivingPPA
#' @field percentRushingPPA
#' @field usage
#' @field passingUsage
#' @field receivingUsage
#' @field rushingUsage
#'
#' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON
#' @export
ReturningProduction <- R6::R6Class(
'ReturningProduction',
public = list(
`season` = NULL,
`team` = NULL,
`conference` = NULL,
`totalPPA` = NULL,
`totalPassingPPA` = NULL,
`totalReceivingPPA` = NULL,
`totalRushingPPA` = NULL,
`percentPPA` = NULL,
`percentPassingPPA` = NULL,
`percentReceivingPPA` = NULL,
`percentRushingPPA` = NULL,
`usage` = NULL,
`passingUsage` = NULL,
`receivingUsage` = NULL,
`rushingUsage` = NULL,
initialize = function(`season`, `team`, `conference`, `totalPPA`, `totalPassingPPA`, `totalReceivingPPA`, `totalRushingPPA`, `percentPPA`, `percentPassingPPA`, `percentReceivingPPA`, `percentRushingPPA`, `usage`, `passingUsage`, `receivingUsage`, `rushingUsage`){
if (!missing(`season`)) {
stopifnot(is.numeric(`season`), length(`season`) == 1)
self$`season` <- `season`
}
if (!missing(`team`)) {
stopifnot(is.character(`team`), length(`team`) == 1)
self$`team` <- `team`
}
if (!missing(`conference`)) {
stopifnot(is.character(`conference`), length(`conference`) == 1)
self$`conference` <- `conference`
}
if (!missing(`totalPPA`)) {
self$`totalPPA` <- `totalPPA`
}
if (!missing(`totalPassingPPA`)) {
self$`totalPassingPPA` <- `totalPassingPPA`
}
if (!missing(`totalReceivingPPA`)) {
self$`totalReceivingPPA` <- `totalReceivingPPA`
}
if (!missing(`totalRushingPPA`)) {
self$`totalRushingPPA` <- `totalRushingPPA`
}
if (!missing(`percentPPA`)) {
self$`percentPPA` <- `percentPPA`
}
if (!missing(`percentPassingPPA`)) {
self$`percentPassingPPA` <- `percentPassingPPA`
}
if (!missing(`percentReceivingPPA`)) {
self$`percentReceivingPPA` <- `percentReceivingPPA`
}
if (!missing(`percentRushingPPA`)) {
self$`percentRushingPPA` <- `percentRushingPPA`
}
if (!missing(`usage`)) {
self$`usage` <- `usage`
}
if (!missing(`passingUsage`)) {
self$`passingUsage` <- `passingUsage`
}
if (!missing(`receivingUsage`)) {
self$`receivingUsage` <- `receivingUsage`
}
if (!missing(`rushingUsage`)) {
self$`rushingUsage` <- `rushingUsage`
}
},
toJSON = function() {
ReturningProductionObject <- list()
if (!is.null(self$`season`)) {
ReturningProductionObject[['season']] <- self$`season`
}
if (!is.null(self$`team`)) {
ReturningProductionObject[['team']] <- self$`team`
}
if (!is.null(self$`conference`)) {
ReturningProductionObject[['conference']] <- self$`conference`
}
if (!is.null(self$`totalPPA`)) {
ReturningProductionObject[['totalPPA']] <- self$`totalPPA`
}
if (!is.null(self$`totalPassingPPA`)) {
ReturningProductionObject[['totalPassingPPA']] <- self$`totalPassingPPA`
}
if (!is.null(self$`totalReceivingPPA`)) {
ReturningProductionObject[['totalReceivingPPA']] <- self$`totalReceivingPPA`
}
if (!is.null(self$`totalRushingPPA`)) {
ReturningProductionObject[['totalRushingPPA']] <- self$`totalRushingPPA`
}
if (!is.null(self$`percentPPA`)) {
ReturningProductionObject[['percentPPA']] <- self$`percentPPA`
}
if (!is.null(self$`percentPassingPPA`)) {
ReturningProductionObject[['percentPassingPPA']] <- self$`percentPassingPPA`
}
if (!is.null(self$`percentReceivingPPA`)) {
ReturningProductionObject[['percentReceivingPPA']] <- self$`percentReceivingPPA`
}
if (!is.null(self$`percentRushingPPA`)) {
ReturningProductionObject[['percentRushingPPA']] <- self$`percentRushingPPA`
}
if (!is.null(self$`usage`)) {
ReturningProductionObject[['usage']] <- self$`usage`
}
if (!is.null(self$`passingUsage`)) {
ReturningProductionObject[['passingUsage']] <- self$`passingUsage`
}
if (!is.null(self$`receivingUsage`)) {
ReturningProductionObject[['receivingUsage']] <- self$`receivingUsage`
}
if (!is.null(self$`rushingUsage`)) {
ReturningProductionObject[['rushingUsage']] <- self$`rushingUsage`
}
ReturningProductionObject
},
fromJSON = function(ReturningProductionJson) {
ReturningProductionObject <- jsonlite::fromJSON(ReturningProductionJson)
if (!is.null(ReturningProductionObject$`season`)) {
self$`season` <- ReturningProductionObject$`season`
}
if (!is.null(ReturningProductionObject$`team`)) {
self$`team` <- ReturningProductionObject$`team`
}
if (!is.null(ReturningProductionObject$`conference`)) {
self$`conference` <- ReturningProductionObject$`conference`
}
if (!is.null(ReturningProductionObject$`totalPPA`)) {
self$`totalPPA` <- ReturningProductionObject$`totalPPA`
}
if (!is.null(ReturningProductionObject$`totalPassingPPA`)) {
self$`totalPassingPPA` <- ReturningProductionObject$`totalPassingPPA`
}
if (!is.null(ReturningProductionObject$`totalReceivingPPA`)) {
self$`totalReceivingPPA` <- ReturningProductionObject$`totalReceivingPPA`
}
if (!is.null(ReturningProductionObject$`totalRushingPPA`)) {
self$`totalRushingPPA` <- ReturningProductionObject$`totalRushingPPA`
}
if (!is.null(ReturningProductionObject$`percentPPA`)) {
self$`percentPPA` <- ReturningProductionObject$`percentPPA`
}
if (!is.null(ReturningProductionObject$`percentPassingPPA`)) {
self$`percentPassingPPA` <- ReturningProductionObject$`percentPassingPPA`
}
if (!is.null(ReturningProductionObject$`percentReceivingPPA`)) {
self$`percentReceivingPPA` <- ReturningProductionObject$`percentReceivingPPA`
}
if (!is.null(ReturningProductionObject$`percentRushingPPA`)) {
self$`percentRushingPPA` <- ReturningProductionObject$`percentRushingPPA`
}
if (!is.null(ReturningProductionObject$`usage`)) {
self$`usage` <- ReturningProductionObject$`usage`
}
if (!is.null(ReturningProductionObject$`passingUsage`)) {
self$`passingUsage` <- ReturningProductionObject$`passingUsage`
}
if (!is.null(ReturningProductionObject$`receivingUsage`)) {
self$`receivingUsage` <- ReturningProductionObject$`receivingUsage`
}
if (!is.null(ReturningProductionObject$`rushingUsage`)) {
self$`rushingUsage` <- ReturningProductionObject$`rushingUsage`
}
},
toJSONString = function() {
sprintf(
'{
"season": %d,
"team": %s,
"conference": %s,
"totalPPA": %s,
"totalPassingPPA": %s,
"totalReceivingPPA": %s,
"totalRushingPPA": %s,
"percentPPA": %s,
"percentPassingPPA": %s,
"percentReceivingPPA": %s,
"percentRushingPPA": %s,
"usage": %s,
"passingUsage": %s,
"receivingUsage": %s,
"rushingUsage": %s
}',
self$`season`,
self$`team`,
self$`conference`,
self$`totalPPA`,
self$`totalPassingPPA`,
self$`totalReceivingPPA`,
self$`totalRushingPPA`,
self$`percentPPA`,
self$`percentPassingPPA`,
self$`percentReceivingPPA`,
self$`percentRushingPPA`,
self$`usage`,
self$`passingUsage`,
self$`receivingUsage`,
self$`rushingUsage`
)
},
fromJSONString = function(ReturningProductionJson) {
ReturningProductionObject <- jsonlite::fromJSON(ReturningProductionJson)
self$`season` <- ReturningProductionObject$`season`
self$`team` <- ReturningProductionObject$`team`
self$`conference` <- ReturningProductionObject$`conference`
self$`totalPPA` <- ReturningProductionObject$`totalPPA`
self$`totalPassingPPA` <- ReturningProductionObject$`totalPassingPPA`
self$`totalReceivingPPA` <- ReturningProductionObject$`totalReceivingPPA`
self$`totalRushingPPA` <- ReturningProductionObject$`totalRushingPPA`
self$`percentPPA` <- ReturningProductionObject$`percentPPA`
self$`percentPassingPPA` <- ReturningProductionObject$`percentPassingPPA`
self$`percentReceivingPPA` <- ReturningProductionObject$`percentReceivingPPA`
self$`percentRushingPPA` <- ReturningProductionObject$`percentRushingPPA`
self$`usage` <- ReturningProductionObject$`usage`
self$`passingUsage` <- ReturningProductionObject$`passingUsage`
self$`receivingUsage` <- ReturningProductionObject$`receivingUsage`
self$`rushingUsage` <- ReturningProductionObject$`rushingUsage`
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.