Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appc.googlesearch

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

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.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 17 Mar 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc