fetch_results: Fetch Results Table

Description Usage Arguments Details Value Examples

View source: R/api.R

Description

Retrieve a summary table from SIHF API. This functionality is particularly useful to compile a list of game IDs that can be user in get_gameDetail.

Usage

1

Arguments

filter

Named vector of fields and values to filter query on. SIHF requires filter. Details on supported filtering options are unknown. Known options include

  • Season (e.g. "2017"); this filter appears to be required

  • Date (e.g. "06.04.2017" or "01.09.2016-05.03.2018")

  • League (e.g. "1" for National League )

  • Phase (e.g. "2443", key not fully understood)

.

As filter is required, passing filter = NULL (default) returns current season (new season starts being returned from July).

Details

The date filter of the SIHF API functions in a non-strict way: if no games matching all other filters took place on the specified date (or in the interval), the API will return the last games before that date / interval matching the filters. That is, if we query the API for a date where no games took place, it will still return games.

Value

httr response object

Examples

1
results <- fetch_results(c(Season = "2017", Date = "09.10.2016"))

msenn/sihfapi documentation built on May 17, 2019, 2:45 p.m.