dojox/data/GoogleSearchStore.Search (version 1.10)

Summary

A data store for retrieving search results from Google. This data store acts as a base class for Google searches, and has a number of child data stores that implement different searches. This store defaults to searching the web, and is functionally identical to the dojox.data.GoogleWebSearchStore object. The following attributes are supported on each item:

The query accepts one parameter: text - The string to search for

Usage

var foo = new GoogleSearchStore.Search(args);
dojox/data/GoogleSearchStore
<

The GoogleSearchStore is a Datastore interface to the Google search service. The constructor accepts the following arguments:

>The GoogleSearchStore is a Datastore interface to the Google search service. The constructor accepts the following arguments:

>
Parameter Type Description
args Object

See the dojox/data/GoogleSearchStore.Search reference documentation for more information.

Property Summary

  • _aggregatedAttributes
  • _attributesThe list of attributes that this store supports
  • _googleUrlThe URL to Googles search web service.
  • _idA unique identifier for this store.
  • _queryAttrsMaps query hash keys to Google query parameters.
  • _requestCountA counter for the number of requests made.
  • _storeRefThe internal reference added to each item pointing at the store which owns it.
  • _type
  • labelThe default attribute which acts as a label for each item.
  • urlPreventCacheSets whether or not to pass preventCache to dojo.io.script.

Method Summary

  • _assertIsAttribute(attribute) This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
  • _assertIsItem(item) This function tests whether the item passed in is indeed an item in the store.
  • _createContent(query,callback,request)
  • _format(item,name)
  • _getItems(data)
  • _getSort()
  • _processItem(item,data)
  • close(request) See dojo/data/api/Read.close()
  • containsValue(item,attribute,value) See dojo/data/api/Read.containsValue()
  • fetch(request) Fetch Google search items that match to a query
  • getAttributes(item) See dojo/data/api/Read.getAttributes()
  • getFeatures() See dojo/data/api/Read.getFeatures()
  • getLabel(item) See dojo/data/api/Read.getLabel()
  • getLabelAttributes(item) See dojo/data/api/Read.getLabelAttributes()
  • getValue(item,attribute,defaultValue) See dojo/data/api/Read.getValue()
  • getValues(item,attribute) See dojo/data/api/Read.getValue()
  • hasAttribute(item,attribute) See dojo/data/api/Read.hasAttributes()
  • isItem(item) See dojo/data/api/Read.isItem()
  • isItemLoaded(item) See dojo/data/api/Read.isItemLoaded()
  • loadItem(keywordArgs) See dojo/data/api/Read.loadItem()

Properties

_aggregatedAttributes
_attributes

The list of attributes that this store supports

_googleUrl

The URL to Googles search web service.

_id

A unique identifier for this store.

_queryAttrs

Maps query hash keys to Google query parameters.

_requestCount

A counter for the number of requests made. This is used to define the callback function that GoogleSearchStore will use.

_storeRef

The internal reference added to each item pointing at the store which owns it.

_type
label

The default attribute which acts as a label for each item.

urlPreventCache

Sets whether or not to pass preventCache to dojo.io.script.

Methods

_assertIsAttribute(attribute)

This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.

Parameter Type Description
attribute attribute-name-string

The attribute to test for being contained by the store.

_assertIsItem(item)

This function tests whether the item passed in is indeed an item in the store.

Parameter Type Description
item item

The item to test for being contained by the store.

_createContent(query,callback,request)
Parameter Type Description
query undefined
callback undefined
request undefined
Returns:object
_format(item,name)
Parameter Type Description
item undefined
name undefined
Returns:undefined
_getItems(data)
Parameter Type Description
data undefined
Returns:undefined
_getSort()
Returns:function
_processItem(item,data)
Parameter Type Description
item undefined
data undefined
close(request)

See dojo/data/api/Read.close()

Parameter Type Description
request undefined
containsValue(item,attribute,value)

See dojo/data/api/Read.containsValue()

Parameter Type Description
item undefined
attribute undefined
value undefined
Returns:boolean
fetch(request)

Fetch Google search items that match to a query

Parameter Type Description
request undefined

A request object

getAttributes(item)

See dojo/data/api/Read.getAttributes()

Parameter Type Description
item undefined
Returns:undefined
getFeatures()

See dojo/data/api/Read.getFeatures()

Returns:object
getLabel(item)

See dojo/data/api/Read.getLabel()

Parameter Type Description
item undefined
Returns:undefined
getLabelAttributes(item)

See dojo/data/api/Read.getLabelAttributes()

Parameter Type Description
item undefined
Returns:Array
getValue(item,attribute,defaultValue)

See dojo/data/api/Read.getValue()

Parameter Type Description
item undefined
attribute undefined
defaultValue undefined
Returns:undefined
getValues(item,attribute)

See dojo/data/api/Read.getValue()

Parameter Type Description
item undefined
attribute undefined
Returns:undefined | Array
hasAttribute(item,attribute)

See dojo/data/api/Read.hasAttributes()

Parameter Type Description
item undefined
attribute undefined
Returns:boolean
isItem(item)

See dojo/data/api/Read.isItem()

Parameter Type Description
item undefined
Returns:boolean
isItemLoaded(item)

See dojo/data/api/Read.isItemLoaded()

Parameter Type Description
item undefined
Returns:undefined
loadItem(keywordArgs)

See dojo/data/api/Read.loadItem()

Parameter Type Description
keywordArgs undefined
Error in the documentation? Can’t find what you are looking for? Let us know!