request-MixPanel-method: MixPanel Data Export API request method

Description Usage Arguments Value Examples

Description

MixPanel Data Export API request method

Usage

1
2
3
## S4 method for signature 'MixPanel'
request(obj, methods = NULL, params = NULL,
  format = "json", endpoint = NULL, presigned = FALSE)

Arguments

obj

MixPanel object

methods

The list of methods for the API call

params

The list of parameters of the API call

format

Response format (default: json)

endpoint

URL of custom API endpoint

presigned

Specifies whether the request is already signed (default: FALSE)

Value

The raw text of the response in the requested format (default: JSON)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
library(mixpanelR)
library(rjson)

api <- MixPanel(
     api_key = "<API_KEY>"
     api_secret = "<API_SECRET>"
)

raw_response <- request(api,
     methods = list("events"),
     params = list(
         event = list("project:successful_donation","project:loaded"),
         unit = "hour",
         interval = 24,
         type = "general"
     )
)

data <- fromJSON(raw_response)
## End(Not run)

realAkhmed/mixpanelR documentation built on May 27, 2019, 4 a.m.