Exemple #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));
        }
Exemple #2
0
        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);
        }
Exemple #3
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);
            }
        }
Exemple #4
0
        public HttpResponseMessage GetPopularLocation([FromBody] HereApiQuery queryParams)
        {
            var popularPlacesList = HereService.GetPopularPlaces(queryParams);

            return(Request.CreateResponse(HttpStatusCode.OK, popularPlacesList));
        }
Exemple #5
0
        public HttpResponseMessage GetPlacesCategories()
        {
            var categories = HereService.GetPlacesCategories();

            return(Request.CreateResponse(HttpStatusCode.OK, categories));
        }
Exemple #6
0
        public HttpResponseMessage GetDestinationList()
        {
            var destinationList = HereService.GetAllDestinations();

            return(Request.CreateResponse(HttpStatusCode.OK, destinationList));
        }