Skip to content

arein/HerePlacesCSharp

Repository files navigation

C# Here Places REST API Wrapper

This Repository allows you to easily integrate the Here Places REST API into your C# apps.

This wrapper currently only supports the Around endpoint of Here while the Places API offers further endpoints.

Platforms

The API was tested on Windows Phone 8 and Windows Phone 8.1. It is built using the async programming model.

Account

In order to use the Here Places API you need a Nokia Developer Account and you to get Here credentials for your app.

Installation

In the Package Manager type Install-Package HerePlacesCSharp

Or download the source and build the project yourself.

Usage

PlacesService service = new PlacesService("my app id", "my app token");

try
{
    List<Place> places = await service.ListPlacesAroundLocation(new GeoCoordinate(40.75874,-73.978674)); // Random Place in NY

    if (places.Count > 0)
    {
        System.Diagnostics.Debug.WriteLine(string.Format("Title: {0}, Distance from the provided coordinate: {1}", places[0].Title, places[0].Distance));
    }
    else
    {
		// No places found for the coordinate
    }
}
catch (Exception e)
{
    System.Diagnostics.Debug.WriteLine(e.Message); // An error occured e.g. no internet
}

Contributing

You're invited to contribute to the repo. There are a few tasks that could be done:

  • Add support for further Platforms
  • Add further options e.g. limit the category type or specify the number of results
  • Integrate further Here Places Endpoints

Apps Using this Library

About

A C# Wrapper for there Here Places REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages