public void GenerateRequestCMD(PropertySearchOptions searchOptions)
        {
            string searchArea;

            if (ManualSearchArea)
            {
                Console.WriteLine("enter the RightMove search area code: ");
                searchArea = Console.ReadLine();
            }
            else
            {
                Console.WriteLine("default search area will be set to: " + defaultSearchArea);
                searchArea = defaultSearchArea;
            }

            Console.WriteLine("press enter to continue");
            while (Console.ReadKey().Key != ConsoleKey.Enter)
            {
            }

            var currentRequest = new RequestGenerator(searchArea, searchOptions);

            Console.WriteLine("Generating search request...");
            Console.WriteLine();

            currentRequest.GenerateJSONRequestCMD();
        }
示例#2
0
        static void Main(string[] args)
        {
            // RequestInterface(true) for manual SearchArea entry
            var requestInterface = new RequestInterface(false);
            var searchOptions    = new PropertySearchOptions();

            requestInterface.GenerateRequestCMD(searchOptions);
        }
        // Makes a new JsonRequest and declares the search options
        public RequestGenerator(string searchArea, PropertySearchOptions searchOptions)
        {
            Request       = new JsonRequest(searchArea);
            SearchOptions = searchOptions;

            basicSearchParameters         = SearchOptions.basicSearchParameters;
            advancedSearchParameters      = SearchOptions.advancedSearchParameters;
            advancedSearchParameterTitles = SearchOptions.advancedSearchParameterTitles;
        }