| Title: | Load Data from 'Ringostat API' | 
| Version: | 0.1.5 | 
| Description: | Loading calls data from 'Ringostat API'. See https://help.ringostat.com/knowledge-base/article/integration-with-ringostat-via-api. | 
| License: | MIT + file LICENSE | 
| Imports: | httr2, stringr, cli, readr (≥ 2.0.0) | 
| Encoding: | UTF-8 | 
| RoxygenNote: | 7.2.1 | 
| NeedsCompilation: | no | 
| Packaged: | 2022-08-12 09:11:45 UTC; Alsey | 
| Author: | Alexey Seleznev | 
| Maintainer: | Alexey Seleznev <selesnow@gmail.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2022-08-12 09:30:05 UTC | 
ringostat: Load Data from 'Ringostat API'
Description
 
Loading calls data from 'Ringostat API'. See https://help.ringostat.com/knowledge-base/article/integration-with-ringostat-via-api.
Author(s)
Maintainer: Alexey Seleznev selesnow@gmail.com (ORCID)
Other contributors:
- Netpeak [copyright holder] 
Set Ringostat API key
Description
Set Ringostat API key
Usage
rs_auth(api_key)
Arguments
| api_key | Your API key | 
Value
No return value, called for side effects
Download call recording
Description
Download call recording
Usage
rs_download_record(call_id, out_file = NULL)
Arguments
| call_id | uniqueid of call | 
| out_file | name of output wav file | 
Value
TRUE if has been downloaded successfully
Examples
## Not run: 
rs_download_record("ua-987h79879")
## End(Not run)
Get calls data
Description
Get calls data
Usage
rs_get_call_data(
  date_from = Sys.Date() - 14,
  date_to = Sys.time(),
  fields = c("caller", "dst", "pool_name", "disposition", "calldate", "category_mark",
    "duration", "call_type", "waittime", "billsec", "connected_with", "call_counter",
    "proper_flag", "repeated_flag", "utm_source", "utm_medium", "utm_campaign",
    "utm_content", "utm_term", "uniqueid", "category_number", "employee_number",
    "employee_mark", "client_id", "remote_ip", "refferrer", "landing", "recording",
    "recording_wav", "call_card", "additional_number", "has_recording", "scheme_name",
    "duration_ms", "department", 
     "caller_number"),
  filters = NULL,
  merge = 0,
  order = NULL
)
Arguments
| date_from | Start date | 
| date_to | End date | 
| fields | List of fields for selection from the call log, see link | 
| filters | Filters for selecting data that meet a condition by field value | 
| merge | Aggregating the sample by the caller's number: 0 - do not combine; 1 - combine every 24 hours; 2 - combine for all time; | 
| order | Sorting a selection | 
Value
tibble with calls data
Examples
## Not run: 
calls <- rs_get_call_data(
    date_from = "2021-09-01",
    date_to = "2021-09-30",
    fields = c('caller', 'utm_campaign'),
    filters = "utm_campaign=brand"
)
## End(Not run)