Socket
Socket
Sign inDemoInstall

appc.googlesearch

Package Overview
Dependencies
4
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    appc.googlesearch

An Arrow connector that connects to google custom search REST API. The Connector provides a single API endpoint which you can query.


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Install size
1.10 MB
Created
Weekly downloads
 

Readme

Source

Google Custom Search Connector for Appcelerator Arrow

An Arrow connector that connects to google custom search REST API. The Connector provides a single API endpoint which you can query.

1. Installation

You can use

npm install appc.googlesearch

or add

"appc.googlesearch" : "1.0.0"

to you packacge.json file.

2. Configuration

Register the connector in your appc.json file :

"dependencies": {
    ...
    "connector/appc.googlesearch": "^0.0.5"
  },
  ...

Set the configuration object in your conf/default.js file :

    connectors: {
        'appc.googlesearch': {
            key: '<googleCustomSearchKey>',
            //One of the following two should be set
            cx: '<googleCustomSeachCX>', //provide this
            cref: '<googleCustomSearchCREF>' //or this
        }
    }

3. Usage

Take a look at all available options and query parameters, in the API documentation section of your arrow administration. Options are available under the group Google Search.

4. Custom API result object

The connector returns a result object that slightly differs from the default API endpoint output. The connector adds "context" Object, as a first level object in the returned result:

{
    'success': true,
    'request-id': '<requId>',
    'key': 'customsearches',
    'customsearches': [],
    'context': {}
};

Where "context" has the following structure:

 {
     title : String,
     facets : Array,
     totalResults : Number
     restUrl : String
}

Where

  • title - is the Custom Search title (set by Google)
  • facets - an Array holding all the facets, registered for this search
  • totalResults - the number of items in this set
  • restUrl - the actual REST url (to google search)

4. Testing

To test the connector, just run

npm test

Keywords

FAQs

Last updated on 17 Mar 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc