public void TestCategory() { var destList = HereService.GetAllDestinations(); //auckland as destination var dest1 = destList[0]; var cat = HereService.GetPlacesCategories(); var item = cat.Select(x => x.Value); var categories = String.Join(",", item.ToArray()); //When passing into the api/here/getPopularPlaces, construct the queryParams as follow HereApiQuery queryParams = new HereApiQuery { Lat = dest1.Latitude, Lon = dest1.Longitude, Category = categories }; //get a list of popular places in Auckland var popularPlace = HereService.GetPopularPlaces(queryParams); }
public void TestMethod1() { try { var destList = HereService.GetAllDestinations(); //auckland as destination var dest1 = destList[0]; HereApiQuery queryParams = new HereApiQuery { Lat = dest1.Latitude, Lon = dest1.Longitude }; //get a list of popular places in Auckland var popularPlace = HereService.GetPopularPlaces(queryParams); //get the detail of a popularPlace (activity detail) var detail = HereService.GetPopularPlaceDetail(popularPlace[0]); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public HttpResponseMessage GetPopularLocation([FromBody] HereApiQuery queryParams) { var popularPlacesList = HereService.GetPopularPlaces(queryParams); return(Request.CreateResponse(HttpStatusCode.OK, popularPlacesList)); }