Minimalistic client to access Blizzards API.

Installation

You can install from GitHub with:

Additional Setup

You need to create a developer account at Blizzard’s dev portal. Once you’ve created an account, a client needs to be made. Creating a client will produce a Client ID and Client Secret. With these credentials you can run:

After this, you’re all set.

If you want to avoid using blizz_auth(), you can obtain the Client ID, Secret, and Token by following the docs. Then edit the .Renviron file manually and supply the credentials like so:

Note: Blizzard’s authentication tokens expire after 24 hours. To avoid having to refresh the token everyday, blizz runs the following command everytime the library is loaded:

blizz_auth(refresh = TRUE)

This will remove the expired token from your .Renviron and add the fresh token to it. More info on how to get started can be found in this vignette.

Example

Use the blizz() function to access all API endpoints. Note that the leading slash must be included as well:

Additionally, we can print the response as JSON thanks to the jsonlite package:

Acknowledgements