Learn R Programming

canadacovid (version 0.3.4)

get_content_parsed: Get content and parse it

Description

Sends a GET request to https://api.covid19tracker.ca/. If the request is successful and the returned content is JSON, formats it and returns it parsed (via jsonlite::fromJSON).

Usage

get_content_parsed(url)

Value

A list.

Arguments

url

A string URL linking to the API. If it does not contain the base "https://api.covid19tracker.ca", then url will be combined with the base to attempt to make a valid URL (and return a warning).

Examples

Run this code

get_content_parsed("https://api.covid19tracker.ca/provinces")

Run the code above in your browser using DataLab