Esempio n. 1
0
        public HttpResponseMessage GetPopularPlaceDetails([FromBody] PopularPlacesModel aPopularPlace)
        {
            PopularPlaceDetailModel popularPlaceDetail = null;

            if (aPopularPlace != null)
            {
                popularPlaceDetail = HereService.GetPopularPlaceDetail(aPopularPlace);
            }

            //return null when detecting invalid
            return(Request.CreateResponse(HttpStatusCode.OK, popularPlaceDetail));
        }
Esempio n. 2
0
        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);
            }
        }