README.md

Introduction

rappbot is an R wrapper for the Appbot API

Useful links

Package Installation

To install this package, we recommend using the devtools package.

install.packages('devtools')

library(devtools)

install_github('neugelb/rappbot')

Authentication

To authenticate, you need to create an API key in the console. Then you authenticate like this:

appbot_auth(user,password)

This will save the authentication credentials to your environment using the keyring package. Obviously you need to be a paying customer with API access to do this!

Sources

Getting a dataframe of your available sources is easy.

sources <- appbot_sources()

This will give you the source ID you will need to be able to access other services.

Ratings

To call the ratings, we have different methods for Android and iOS.

For Android, the following:

android_reviews <- appbot_ratings_android(app_id, method, start = NULL, end = NULL)

Here's an example:

start_date = '2020-03-26'
end_date = Sys.Date()-2

droid_ratings <- appbot_ratings_android(droid_id,'historical',start_date,end_date)

For iOS:

ios_reviews <- appbot_ratings_ios(app_id, method, output, country, start = NULL, end = NULL)

The reason for this is that there are differences in the way the data is structured between the two OS types.

Reviews

reviews <- appbot_reviews(app_id)

There are many different options for query parameters to add to the reviews call, which is why they are passed in the ellipse. You need to refer to the documentation to see how the parameters are described, and then add them in the appropriate way, for instance if you wanted to get reviews from Germany, you would pass 'country=DE' as an argument.

Example:

s <- paste('start',start_date,sep='=') # returns "start=2020-03-26"
e <- paste('end',end_date,sep = '=')

droid_reviews <- appbot_reviews(droid_id,5,s,e)

An additional option would be to pivot the topics column (which is returned as a list column) out into individual columns each, like this:

droid_reviews_pivoted <- appbot_reviews(droid_id,pivoted=TRUE)

Other tools:



neugelb/rappbot documentation built on Dec. 12, 2020, 9:17 a.m.