betfaiR

The bf_check function attempts to check for any errors in the response from bf_post, this isn’t a thorough check. It looks for mention of four error codes, then checks if the result response has more than 0 elements in it, once checked the response will be passed to bf_parse, which has multiple methods based on the method of the response.

usage

res <- bf_check(res,
                method = "competitions")

arguments

param details
res response object returned by bf_post and parsed by httr::content
method method to which the initial response was passed.

return

If no errors are returned then a list with the response data. Errors may be invalid JSON, missing parameters, or if the response contains zero results, otherwise return the results with a class that corresponds to the method that can then be parsed into a dataframe by bf_parse.