|
|
|
@ -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'); |
|
|
|
|