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