get_daily_client_properties {revulyticsR} | R Documentation |
Returns the list of daily client properties for all the client Ids installed during a user provided date range for all the Product Ids.
get_daily_client_properties(
rev_product_ids,
rev_session_id,
rev_username,
product_properties_df,
desired_properties,
installed_start_date,
installed_end_date,
daily_start_date,
daily_end_date
)
rev_product_ids |
A vector of revulytics product id. |
rev_session_id |
Session ID established by the connection to Revulytics API. This can be obtained with revulytics_auth(). |
rev_username |
Revulytics username. |
product_properties_df |
Data frame with available properties for all product ids. Can obtain with the get_product_properties function. |
desired_properties |
The property names of the metadata you want to collect. |
installed_start_date |
Date object for the starting date of product installations. |
installed_end_date |
Date object for the ending date of product installations. |
daily_start_date |
Date object for the starting date of desired properties of the product. |
daily_end_date |
Date object for the ending date of desired properties of the product. |
It is not recommended that your username be stored directly in your code. There are various methods and packages available that are more secure; this package does not require you to use any one in particular.
This API call can only return 200 Client Ids at a time. It will take a long time to execute if you have many Client Ids, as the function will submit requests to the API repeatedly; this may even result in a timeout error from the server. In order to provide data for troubleshooting this function will write a message to the console after each call. It is recommended that you divert the console output to a text file. You can do this in multiple ways, including with the sink function (see example for how to do this).
For the same reason you are encouraged to break your request into smaller chunks using the install dates and/or splitting up your product Ids.
Data frame with selected properties for each Client Id.
## Not run:
rev_user <- "my_username"
rev_pwd <- "super_secret"
product_ids_list <- c("123", "456", "789")
session_id <- revulytics_auth(rev_user, rev_pwd)
product_properties <- get_product_properties(product_ids_list, session_id, rev_user)
sink("output_filename.txt")
sink(stdout(), type = "message")
daily_client_properties <- get_daily_client_properties(product_ids_list, session_id, rev_user,
product_properties, c("Property1", "Property2"), start_date, end_date,
daily_start_date = "01-01-2020", daily_end_date = "01-31-2020")
sink()
## End(Not run)