matomo_package_query: matomoR query function

Description Usage Arguments Value Examples

View source: R/matomo_package_query.R

Description

This is an internal function of the matomoR package to query the api. You can use it to call any endpoint that does not have a higher-level interface.

Usage

1

Arguments

query

A list of query parameters.

url

The URL for the api call, by default the environment variable MATOMO_HOST.

Value

The response of the api call.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Sys.setenv(MATOMO_HOST = "https://demo.matomo.org")
Sys.setenv(MATOMO_TOKEN = "anonymous")

# Construct the query
query <- list(
 module = "API",
 method = "API.getMatomoVersion"
)

# Make the query
matomo_package_query(query = query)

ebbertd/matomoR documentation built on Oct. 25, 2021, 2:09 p.m.