From 129755ec61b76d2d65cd3007e3ba50094917ec10 Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Mon, 25 Sep 2017 15:26:25 -0300 Subject: [PATCH] updated config array to work with latest api --- targets/eds/roblib_search_eds.module | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/targets/eds/roblib_search_eds.module b/targets/eds/roblib_search_eds.module index c5a1b38..afcbfcd 100644 --- a/targets/eds/roblib_search_eds.module +++ b/targets/eds/roblib_search_eds.module @@ -263,10 +263,11 @@ function roblib_search_eds_get_results($query = NULL, $type = 'Articles') { } $filters = array(); $config = roblib_search_eds_build_config_arr($type); - $eds_api = new EBSCOAPI($config); + $number_per_page = variable_get('roblib_search_eds_num_results', '5'); $query .= $limiters; $search = array('lookfor' => $query, 'type' => 'ALLFields', 'index' => 'AllFields', 'q' => 'ebsco/results', 'op' => 'Search'); + $eds_api = new EBSCOAPI($config); $output = $eds_api->apiSearch($search, $filters, 1, $number_per_page); return json_encode($output); } @@ -325,7 +326,7 @@ function roblib_search_eds_get_query_limiters($type) { function roblib_search_eds_build_config_arr($type) { $config = array(); $config['user'] = variable_get('roblib_search_eds_user', 'edsusername'); - $config['pass'] = variable_get('roblib_search_eds_pass', 'edspassword'); + $config['password'] = variable_get('roblib_search_eds_pass', 'edspassword'); $config['profile'] = ($type === 'Books') ? variable_get('roblib_search_eds_book_profile', 'apilite') : variable_get('roblib_search_eds_profile', 'edsapi'); $config['auth_url'] = variable_get('roblib_search_eds_auth_url', 'https://eds-api.ebscohost.com/Authservice/rest');