function runQuery(term, start, end) {

			// Adjust to get search terms in proper format
			var term = term.trim();
			var start = start.trim() + "0101";
			var end = end.trim() + "1231";

			console.log("Query Run");
			// Run a query using Axios. Then return the results as an object with an array.
			// See the Axios documentation for details on how we structured this with the params.
			return axios.get('https://api.nytimes.com/svc/search/v2/articlesearch.json', {
				params: {
					'api-key': APIKey,
					'q': term,
					'begin_date': start,
					'end_date': end
				}
			}).then(function (results) {
				console.log("Axios Results", results.data.response);

				return results.data.response;
			});
		}
// This will run our query.
This will run our query.
This will run our query .
function runQuery(term, start, end) {
			var term = term.trim();
			var start = start.trim() + "0101";
			var end = end.trim() + "1231";
			console.log("Query Run");
			return axios.get('https://api.nytimes.com/svc/search/v2/articlesearch.json', {
				params: {
					'api-key': APIKey,
					'q': term,
					'begin_date': start,
					'end_date': end
				}
			}).then(function (results) {
				console.log("Axios Results", results.data.response);
				return results.data.response;
			});
		}
function runQuery ( term , start , end ) { var term = term . trim ( ) ; var start = start . trim ( ) + "0101" ; var end = end . trim ( ) + "1231" ; console . log ( "Query Run" ) ; return axios . get ( 'https://api.nytimes.com/svc/search/v2/articlesearch.json' , { params : { 'api-key' : APIKey , 'q' : term , 'begin_date' : start , 'end_date' : end } } ) . then ( function ( results ) { console . log ( "Axios Results" , results . data . response ) ; return results . data . response ; } ) ; }
This will run our query.
This will run our query .
// Adjust to get search terms in proper format // Run a query using Axios. Then return the results as an object with an array. // See the Axios documentation for details on how we structured this with the params.