sst_call_api_method: Make a request to Serpstat API endpoint

Description Usage Arguments Value Examples

View source: R/utility_functions.R

Description

Make a request to Serpstat API endpoint

Usage

1
sst_call_api_method(api_token, api_method, api_params = NULL)

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.

Value

The list with a response data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
api_params <- list(
  query = 'serpstat.com',
  page  = 1,
  size  = 5
  )
tryCatch({
  serpstatr:::sst_call_api_method(
    api_token  = 'api_token',
    api_method = 'SerpstatLimitsProcedure.getStats',
    api_params = api_params
    )
})

serpstatr documentation built on Jan. 11, 2021, 1:36 a.m.