Esempio n. 1
0
        public static string GetCategoriesPlaces(HereApiQuery query)
        {
            var categoriesPlaces = "/places/v1/categories/places";
            var at     = String.Format("%at={0},{1}", query.Lat, query.Lon);
            var appKey = String.Format("app_id={0}&app_code={1}", KEY.ID, KEY.CODE);
            var others = "&pretty";

            var url = _BASE + categoriesPlaces + "?" + appKey + at + others;

            return(url);
        }
Esempio n. 2
0
        /// <summary>
        /// Get explore url
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        public static string GetExplore(HereApiQuery query)
        {
            var queryStr = "";

            queryStr += String.Format("at={0}%2C{1}", query.Lat, query.Lon);
            //            query += "at=" + "-36.8623%2C174.7494";//TODO use location value
            queryStr += "&app_id=" + KEY.ID;
            queryStr += "&app_code=" + KEY.CODE;

            if (String.IsNullOrEmpty(query.Category))
            {
                queryStr += "&cat=" + query.Category;
            }

            var explore = "/places/v1/discover/explore";
            var url     = _BASE + explore + "?" + queryStr;

            return(url);
        }