Creating the client - MangoDevx/BattleMetricsNet GitHub Wiki
Creating a BattleMetrics developer token
- Create a developer account with battle metrics (https://www.battlemetrics.com/developers)
- Create an api token on the developers page using the "New Token" button. Save the token somewhere
Setting up the BattlemetricsNet client
Setting up the client is straight forward.
new BmClient("devToken")
- I recommend putting your token in an App.config or somewhere else outside of the application, and referencing it through ConfigurationManager, or any other token/secret based setup
- I personally use ConfigurationManager. ex:
ConfigurationManager.AppSettings["BmToken"]
- I personally use ConfigurationManager. ex:
Reusability
To reuse the client over the code with minimal resources being wasted:
- Setup a ServiceCollection
- Add your bmClient as a singleton
- Constructor inject in other classes