R
Latest commit fa5cb1f Sep 21, 2016 @tcash21 tcash21 committed on GitHub update api URL
Permalink
Failed to load latest commit information.
R update api URL Sep 21, 2016
man add mob Mar 21, 2016
.gitignore package files Dec 9, 2015
DESCRIPTION Changes User Agent Name to meet section 5.5.3 of HTTP/1.1 Semantics a… May 11, 2016
LICENSE Initial commit Dec 9, 2015
NAMESPACE
README.md Use Developer API vs Playbook link May 16, 2016

README.md

stattleship-r

Stattleship R Wrapper brought to you by @stattleship.

Check out the Stattleship API - The Sports Data API you've always wanted.

Affordable. Meaningful. Developer-Friendly.

🏈, 🏀, ⚫️ and ⚾️ available now. College 🏈 and Major League ⚽️ to come.

We're gonna need a bigger ⛵️!

Install

devtools::install_github("stattleship/stattleship-r")

Getting Started

Obtain an access TOKEN from stattleship.com. Load R and initialize your TOKEN for your session and load the library:

library(stattleshipR)
set_token('insert-your-token-here')

Get all NBA players:

league <- "nba"
sport <- "basketball"
ep <- "players"
q_body <- list()
players <- ss_get_result(sport = sport, league = league, ep = ep,
                         query = q_body, version = 1, walk = TRUE)
players_df <- do.call("rbind", lapply(players, function(x) x$players))

Get all triple doubles this NBA season:

league <- "nba"
sport <- "basketball"
ep <- "stats"
q_body <- list(stat = "triple_double", type = "basketball_doubles_stat")
tripdubs <- ss_get_result(sport = sport, league = league, ep = ep,
                          query = q_body, version = 1, walk = FALSE)

Next Steps

Want more? Check out our available stats across an expanding number of sports at the Stattleship Developer API Documentation or Stattleship blog.

Style Guide

We plan to follow Hadley Wickham's R Style Guide. Please follow these guidelines if you'd like to contribute!