Skip to content
ardliath edited this page Sep 16, 2014 · 13 revisions

Getting Started

This is our quick start guide to using the API client.

Create Application Key

In order to use the API client library you will need a BuddyBeacon API Key from ViewRanger. You can apply for a key on their website.

Once you've got your key you'll need the username and PIN of a BuddyBeacon user, the ViewRanger app is free to download on Android and iOS.

Download NuGet package

The easiest way to install the library is to download our nuget package. Alternatively you can get the source from our GitHub page.

The Code

The library takes away the hard work of accessing and parsing the API and replaces it with an easy to use fluent interface.

To query the API for the last known location of your user use the GetLastPosition() method.

var appKey = @"123456789";
var username = "user1";
var pin = "1234";
var client = new ViewRangerClient(appKey);
var lastLocation = client.GetLastPosition()
    .ForUser(username, pin)
    .Request();

If you want to download a selection of points (forming a route) you can specify From/To and Limit parameters.

var track = client.GetTrack()
    .ForUser(username, pin)
    .From(DateTime.Now.AddHours(-5))
    .To(DateTime.Now)
    .Limit(50)
    .Request(); 

There's more information about downloading tracks here and a detailed guide of the information returned from the requests here.

If you receive any exceptions while making your request view our Exception Guide to resolve the issues.

Clone this wiki locally