fetch_squiggle_data: Access Squiggle data using the squiggle API service.

Description Usage Arguments Details Value Examples

View source: R/fetch-squiggle-data.R

Description

Use fetch_squiggle_data to access the Squiggle API. See instructions at api.squiggle.com.au.

Usage

1
2
3
4
5
fetch_squiggle_data(
  query = c("teams", "sources", "games", "tips", "ladder", "standings", "virtual",
    "pav"),
  ...
)

Arguments

query

A text string. The main query to use with the API. Must be one of sources, games, tips, ladder or standings

...

(optional) An optional argument provided to the Squiggle API. See details for more info.

Details

The optional arguments to squiggle can be one of the following.

#'

For full instructions, see api.squiggle.com.au

Value

A dataframe, with the resultant data that matches the query specified in query, as well as any optional filters.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Return a list of the sources, with ID's
sources <- get_squiggle_data("sources")

# Get tips for Round 1, 2018
tips <- get_squiggle_data(query = "tips", round = 1, year = 2018)

# Get tips from Squiggle 2019
squiggle <- get_squiggle_data(query = "tips", source = 1, year = 2019)

## End(Not run)

fitzRoy documentation built on March 16, 2021, 9:07 a.m.