R/get_team_key.R

Defines functions get_team_key

#' Get Team Key
#'
#' @importFrom httr content
#'
#' @param config httr config with oauth token
#'
#' @return string of complete team key
#' @export
#'
#' @examples
#' get_team_key(config)
get_team_key <- function(config) {
  resp <- get_data("users;use_login=1/games;game_keys=nfl/teams", config)
  content(resp)$fantasy_content$users$`0`$user[[2]]$games$`0`$game[[2]]$teams$`0`$team[[1]][[1]]$team_key
}
TK2575/fantasyFootballData documentation built on May 17, 2019, 10:37 a.m.