get_data: Get Data

Description Usage Arguments Value

View source: R/get_data.R

Description

A function that generates JSON data from a particular endpoint provided to the function as a string.

Usage

1
get_data(endpoint, KEYS)

Arguments

endpoint

A character string that defines the endpoint and parameters utilized to gather the data. The endpoint is accessed by concatenating the string HOST -> endpoint -> apiKey.

KEYS

A list containing options such as testing / prediction / important variables and information. Also contains API information.

Value

A list of data corresponding to the 'endpoint' if status_code == 200, or NULL for an appropriate response if status_code != 200


niallbenj/footballstats documentation built on Aug. 13, 2019, 5:12 p.m.