<commit_before># stattleship-r

Stattleship R Wrapper brought to you by [@stattleship](https://twitter.com/stattleship).

Check out the [Stattleship API](https://www.stattleship.com) - The Sports Data API you've always wanted

Affordable. Meaningful. Developer-Friendly.

:football: :basketball: and :black_circle: with :baseball: coming soon. 

We're gonna need a bigger :boat:!

## Install
`devtools::install_github("stattleship/stattleship-r")`

## Getting Started
Obtain an access TOKEN from [stattleship.com](www.stattleship.com). Load R and initialize your TOKEN for your session and load the library:

```
library(stattleshipR)
setToken('insert-your-token-here')
```

Get all NBA players:

```
league = "nba"
sport = "basketball"
ep = "players"
q_body = list()
players = stattle(sport=sport, league=league, ep=ep, query=q_body, version=1, verbose=TRUE, 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 = stattle(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 Playbook](http://playbook.stattleship.com/).<commit_msg>Changed README for ssGetResult<commit_after># stattleship-r

Stattleship R Wrapper brought to you by [@stattleship](https://twitter.com/stattleship).

Check out the [Stattleship API](https://www.stattleship.com) - The Sports Data API you've always wanted

Affordable. Meaningful. Developer-Friendly.

:football: :basketball: and :black_circle: with :baseball: coming soon. 

We're gonna need a bigger :boat:!

## Install
`devtools::install_github("stattleship/stattleship-r")`

## Getting Started
Obtain an access TOKEN from [stattleship.com](www.stattleship.com). Load R and initialize your TOKEN for your session and load the library:

```
library(stattleshipR)
setToken('insert-your-token-here')
```

Get all NBA players:

```
league = "nba"
sport = "basketball"
ep = "players"
q_body = list()
players = ssGetResult(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 = ssGetResult(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 Playbook](http://playbook.stattleship.com/).
{'fraction_non_alphanumeric': 0.13304252998909488, 'fraction_numerical': 0.0014540167211922936, 'mean_word_length': 6.002544529262087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2664075', 'n_tokens_mistral': 1004, 'n_tokens_neox': 948, 'n_words': 263}