public PhotoFrameApplication(IKeywordRepository keywordRepository, IPhotoRepository photoRepository, IPhotoFileService photoFileService)
 {
     _registKeyword  = new RegistKeyword(keywordRepository);
     _detailSearch   = new DetailSearch();
     _searchFolder   = new SearchFolder(photoRepository, photoFileService);
     _toggleFavorite = new ToggleFavorite(photoRepository);
     _sortList       = new SortList();
     _changeKeyword  = new ChangeKeyword(keywordRepository, photoRepository);
     _getKeywordList = new GetKeywordList(keywordRepository);
 }
Example #2
0
        public DetailSearch GetDetail(string placeId)
        {
            string getUrl = GetPoseUrl(MethodType.detailSearch);
            string param  = "key=" + ApiKey;

            param += "&placeid=" + placeId;
            string       url    = getUrl + param;
            DetailSearch result = ExecRequest <DetailSearch>(url);

            return(result);
        }
Example #3
0
        /**
         * This method takes in the places_id from the google api and searches details
         */
        public DetailResult GetDetailResult(string placeId)
        {
            // Initializing Request and adding API Key to it
            RestRequest request = new RestRequest("details/json?", Method.GET);

            request.AddQueryParameter("key", _apiKey);

            // Adding parameters to look for places with near addresses
            request.AddQueryParameter("place_id", placeId);

            // Get response with request
            IRestResponse response = _client.Execute(request);

            // Convert result into model and return response
            DetailSearch apiResult = JsonConvert.DeserializeObject <DetailSearch>(response.Content);

            // Return Result
            return(apiResult.Result);
        }