forked from propellerpdx/bambooHR
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
57 lines (34 loc) · 1.74 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
output: github_document
---
# bambooHR <img src='man/figures/hex.png' align="right" width="120" />
<!-- badges: start -->
[![R-CMD-check](https://github.com/MangoTheCat/bambooHR/workflows/R-CMD-check/badge.svg)](https://github.com/MangoTheCat/bambooHR/actions)
[![codecov](https://codecov.io/gh/MangoTheCat/bambooHR/branch/develop/graph/badge.svg?token=MO7E11509U)](https://app.codecov.io/gh/MangoTheCat/bambooHR)
<!-- badges: end -->
`{bambooHR}` is an R wrapper for the bambooHR API. By supplying a company domain and an API access token, users can seamlessly make API requests through built-in R functions. Get employees, employee files, reports and tables, all from within R.
## Installing and Loading {bambooHR}
To install the latest release from CRAN, run:
```{r, eval = FALSE}
install.packages("bambooHR")
```
Alternatively to install latest version on GitHub, run:
```{r, eval = FALSE}
remotes::install_github("https://github.com/MangoTheCat/bambooHR")
```
Finally, load the package:
```{r, eval = FALSE}
library(bambooHR)
```
## Authentication
In order to obtain an API key, you will need to login to bambooHR via an account with administrative privileges. Hit the user icon in the top-right and select 'API Keys'. Next, enter a name for the API key in the API Key Name field and click Generate Key. Copy the key to clipboard.
Now run the `config_setup()` function, supplying your API key and the company domain, plus an optional filepath for where to store the config file.
```{r, eval = FALSE}
config_setup(apikey = "API_KEY_12345",
companyname = "Ascent",
conffile = "./bbhr_config.json")
```
The package functions will now pull in your configuration information automatically.
```{r, eval = FALSE}
get_employee()
```