我正在尝试调用Amplitude Export API(链接此处:https://developers.amplitude.com/docs/export-api)带有R.
以下是解释,但我真的不知道如何使用GET或curl函数之类的函数来应用以下内容。
curl -u API_Key:Secret_Key 'https://amplitude.com/api/2/export?start=20150201T5&end=20150203T20' >> yourfilename.zip
不是真正的R专家,但像这样的东西应该能在中工作
require(httr)
params = list(
`start` = '20150201T5',
`end` = '20150203T20'
)
res <- httr::GET(url = 'https://amplitude.com/api/2/export', query = params, httr::authenticate('API_Key', 'Secret_Key'))