The class for managing search parameters.

Constructors

Properties

source: Partial<RequestFeedParams>

The search parameters.

Methods

  • Gets the start-index parameter.

    Returns number

  • Sets and gets the start-index parameter.

    Parameters

    • index: string | number

      The new start index.

    Returns number

  • Gets the published-min parameter.

    Returns MaybeString

  • Sets and gets the published-min parameter.

    Parameters

    • min: string

      The new date.

    Returns string

  • Removes the published-min parameter.

    Parameters

    • min: Nullables

    Returns Nullables

  • Parameters

    • Optionalmin: MaybeString

    Returns MaybeString

  • Removes the published-max parameter.

    Parameters

    • max: Nullables

    Returns Nullables

  • Gets the published-max parameter.

    Returns MaybeString

  • Sets and gets the published-max parameter. RequestFeedParams.published-max

    Parameters

    • max: string

      The new date.

    Returns string

  • Parameters

    • Optionalmax: MaybeString

    Returns MaybeString

  • Gets the updated-min parameter.

    Returns MaybeString

  • Sets and gets the updated-min parameter.

    Parameters

    • min: string

      The new date.

    Returns string

  • Removes the updated-min parameter.

    Parameters

    • min: Nullables

    Returns Nullables

  • Parameters

    • Optionalmin: MaybeString

    Returns MaybeString

  • Gets the updated-max parameter.

    Returns MaybeString

  • Sets and gets the updated-max parameter.

    Parameters

    • max: string

      The new date.

    Returns string

  • Removes the updated-max parameter.

    Parameters

    • max: Nullables

    Returns Nullables

  • Parameters

    • Optionalmax: MaybeString

    Returns MaybeString

  • Creates a new object with only the defined parameters.

    Returns Partial<RequestFeedParams>

    Since 1.2 undefined or null values deletes the property from the source. Use source instead.

    var params = new SearchParams();
    params.query("title") // { source: { q: 'title' } }
    params.max(9) // { source: { q: 'title', "max-results": 12 } }
    params.query(undefined) // { source: { q: undefined, "max-results": 12 } }
    var source = params.toDefined(); // { "max-results": 12 }