Howdy,

First off, great module! Thanks for sharing it.

I have a very specific use case for querying our Custom Site Search that requires me to create a custom module for it. I'd like for my module to use your module as a dependency as the code in your GoogleSiteSearch class provides me with the core functionality to query Google's CSE and fetch results.

I need to use more of the available parameters as described in https://developers.google.com/custom-search/docs/xml_results?hl=en#wsAdv....

Regards,
Enrique

Comments

enrique.delgado’s picture

Status: Active » Needs review
StatusFileSize
new1.86 KB

Please consider the following patch contribution to achieve the above goal.

Just to clarify, I've verified that no other file in your module requires modification even after this patch is applied. Since the new options are an optional parameter to the constructor of the class, your existing code works as desired. Yet, it allows me to instantiate your class like so:

$gss = new GoogleSiteSearch($query, variable_get('gss_api_key', ''), null, array('as_sitesearch' => 'www.example.com'));

Regards,
Enrique

dhavyd’s picture

Assigned: Unassigned » dhavyd
Status: Needs review » Reviewed & tested by the community

Hi! Thanks for your patch. I have commited and given you the authorship of it. Look at http://drupal.org/node/1346792/commits. This new feature will come up in the next release.

dhavyd’s picture

Status: Reviewed & tested by the community » Closed (fixed)
enrique.delgado’s picture

Thanks for incorporation the patch! :-]

enrique.delgado’s picture

Issue summary: View changes

Fixing code markup