get_test: Get status and meta data of a specific test

Description Usage Arguments Value Examples

View source: R/get_test.R

Description

Get the status and meta data of a specific GTmetrix test. Returns the associated report instead, if the report is already completed.

Usage

1
get_test(test_id, api_key, wait_for_completion = TRUE)

Arguments

test_id

ID of a GTmetrix test. (string)

api_key

An active GTmetrix API key. (string)

wait_for_completion

Whether the function should wait for the completion of the test. If TRUE (default), the report associated with the test ID will be requested in roughly 3 second intervals and returned, when successful. If FALSE, the meta data of the test will be returned. (TRUE, FALSE)

Value

A data.frame object that contains either the test meta data or the GTmetrix report (if it's already completed)

Examples

1
2
3
4
5
## Not run: output_table <- get_test(
                           test_id = "TEST_ID",
                           api_key = "API_KEY"
                         )
## End(Not run)

rgtmx documentation built on Nov. 12, 2021, 1:08 a.m.