https://github.com/holistics/holistics-r
R package to interact with Holistics API
https://github.com/holistics/holistics-r
Last synced: about 2 months ago
JSON representation
R package to interact with Holistics API
- Host: GitHub
- URL: https://github.com/holistics/holistics-r
- Owner: holistics
- License: other
- Created: 2019-03-01T11:40:07.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-26T01:40:41.000Z (about 4 years ago)
- Last Synced: 2024-11-09T10:44:55.397Z (3 months ago)
- Language: R
- Size: 10.7 KB
- Stars: 4
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - holistics/holistics-r - R package to interact with Holistics API (R)
README
# R package for Holistics API
This is our R package which allows R users to export Holistics' report data by inputting:
- Your tenant URL
- Your API-key
- Report's ID
- A list of filters applied to that report## Installation
You can either install Holistics from CRAN, or grab the latest version from GitHub.
- Install from CRAN:
```
install_packages("Holistics")
```- Install from GitHub:
```
devtools::install_github("holistics/holisticsr")
```## Basic usage
For most use cases, you can just use `export_data()` to download report's data. For example, we have a complete report link with all filters:
https://secure.holistics.io/queries/1846-users-growth/queries?start_date=2019-01-01&end_date=2019-01-31&status=active
This link will translate into the following function call:
```
report_data = export_data(url = "https://secure.holistics.io/",
api_key = "api_key",
report_id = "1846-users-growth",
filters = list(start_date = "2019-01-01",
end_date = "2019-01-31",
status = "active"))
```Behind the scene this function uses three assistance functions consecutively:
```
# Submit an export request
job_id = submit_request(url, api_key, report_id, filters)# Check result status with a HTTP request. As long as the request is valid,
# this will run until the result is ready for downloading.
# If the request is invalid, this will raise an error.
check_result(url, api_key, job_id)# Download report result after it is ready
result_df = download_result(url, api_key, job_id)
```In other words, you can use these functions individually to gain greater control of the export creation and data download process.
## Documentation
Holistics' API documentation, as well as full usage of Holistics R & Python libraries can be found here: https://docs.holistics.io/reference
## Copyright and License:
Copyright (c) 2019, Holistics Software
HolisticsR source code is licensed under [MIT License](https://github.com/holistics/holistics-r/blob/master/LICENSE.md)