Skip to content
ardliath edited this page Sep 11, 2014 · 1 revision

The ViewRanger BuddyBeacon API Client library can be initialised either in code or via .NET's configuration files.

When constructing the client you can pass in your ApplicationKey and the address of the API through the constructor.

var client = new ViewRangerClient("123456789", ViewRangerClient.DefaultApiBaseAddress);

Or if you're content to leave the default API address simply omit the parameter.

var client = new ViewRangerClient("123456789");

However, if you'd prefer to store your ApplicationKey in your Web.Config file you can use the parameterless constructor.

var client = new ViewRangerClient();

If you do this you'll need to register the viewRanger ConfigurationSection definition

<section name="viewRanger" type="Liath.ViewRanger.Configuration.ViewRangerConfigurationSection, Liath.ViewRanger" />

As well as the viewRanger section in the file

<viewRanger>
  <applicationKey key="12345789" />
  <apiAddress url="12345789" />
</viewRanger>

Once again the address of the API is optional and can be omitted for the sake of clarity.

<viewRanger>
  <applicationKey key="12345789" />
</viewRanger>

If you do this the default value will be used.

Clone this wiki locally