Learn R Programming

serpstatr (version 0.3.0)

sst_call_api_method: Make a request to Serpstat API endpoint

Description

Make a request to Serpstat API endpoint

Usage

sst_call_api_method(api_token, api_method, api_params = NULL)

Value

The list with a response data.

Arguments

api_token

Serpstat API token from the profile page.

api_method

Internal name of API method.

api_params

A list of API parameters used by api_method. More information about parameters in the official docs.

Examples

Run this code
# \donttest{
api_params <- list(
  query = 'serpstat.com',
  page  = 1,
  size  = 5
  )
tryCatch({
  serpstatr:::sst_call_api_method(
    api_token  = Sys.getenv('SERPSTAT_API_TOKEN'),
    api_method = 'SerpstatLimitsProcedure.getStats',
    api_params = api_params
    )
})
# }

Run the code above in your browser using DataLab