API Docs for: 0.1
Show:

SearchMetaData Class

Metadata passed with search requests. Two forms of construction are allowed depending on the number and types of the parameters:

  • with locale and form factor or
  • with cardinality, locale, and form factor.

Methods

aggregated_keywords

() Array of String

Get the list of scope keywords used to initiate this search request.

Returns:

Array of String:

The list of scope keywords used to initiate this search request.

cardinality

() Int

Get cardinality.

Returns:

Int:

contains_hint

(
  • key
)
Boolean

Check if this SearchMetadata has a hint.

Parameters:

  • key String

    The hint name.

Returns:

Boolean:

True if the hint is set.

form_factor

()

Get the form factor string.

Returns:

The form factor string

get

(
  • key
)
String

Get the value of an attribute

Parameters:

  • key String

Returns:

String:

, {Number} or {Object}

has_location

() Boolean

Does the SearchMetadata have a location.

Returns:

Boolean:

True if there is a location property.

hints

() Dictionary

Get all hints.

Returns:

Dictionary:

internet_connectivity

() ConnectivityStatus

Get internet connectivity status.

Returns:

ConnectivityStatus:

The internet connectivity status.

is_aggregated

() Boolean

Check if this search request originated from an aggregator scope.

Returns:

Boolean:

True if this search request originated from an aggregator scope.

locale

()

Get the locale string.

Returns:

The locale string

location

() Location

Get location.

Returns:

Location:

data representing the current location, including attributes such as city and country.

remove_location

()

Remove location data entirely. This method does nothing if no location data is present.

set

(
  • key
  • value
)

Set the value of an attribute

Parameters:

  • key String
  • value String

    , {Number} or {Object}

set_aggregated_keywords

(
  • aggregated_keywords
)

Set the list of scope keywords used to initiate this search request.

Parameters:

  • aggregated_keywords Array of String

    The list of scope keywords used to initiate this search request.

set_cardinality

(
  • cardinality
)

Set cardinality.

Parameters:

  • cardinality Int

set_hint

(
  • key
  • value
)

Sets a hint.

Parameters:

  • key String

    The name of the hint.

  • value Object

    Hint value

set_internet_connectivity

(
  • The
)

Set internet connectivity status.

Parameters:

  • The ConnectivityStatus

    internet connectivity status.

set_location

(
  • location
)

Set location.

Parameters:

  • location Location

    data