Class: Telnyx::Models::WebSearchCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/telnyx/models/web_search_create_params.rb,
sig/telnyx/models/web_search_create_params.rbs

Overview

See Also:

  • Telnyx::Resources::WebSearch#create

Defined Under Namespace

Modules: Safesearch

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(query:, count: nil, country: nil, exclude_domains: nil, freshness: nil, include_domains: nil, livecrawl: nil, safesearch: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::WebSearchCreateParams for more details.

Parameters:

  • query (String)

    The search query text.

  • count (Integer) (defaults to: nil)

    Number of results to return (1-100).

  • country (String) (defaults to: nil)

    Two-letter country code (ISO 3166-1 alpha-2) to bias results.

  • exclude_domains (Array<String>) (defaults to: nil)

    Exclude results from these domains (bare hostnames, e.g. pinterest.com).

  • freshness (String) (defaults to: nil)

    Time-based filter for results. Common values: day, week, month, year.

  • include_domains (Array<String>) (defaults to: nil)

    Restrict results to these domains (bare hostnames, e.g. arxiv.org).

  • livecrawl (Boolean) (defaults to: nil)

    When true, the provider crawls pages in real-time for fresh content. The boolean

  • safesearch (Symbol, Telnyx::Models::WebSearchCreateParams::Safesearch) (defaults to: nil)

    Safe search filter level.

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/telnyx/models/web_search_create_params.rb', line 60

Instance Attribute Details

#countInteger?

Number of results to return (1-100).

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


20
# File 'lib/telnyx/models/web_search_create_params.rb', line 20

optional :count, Integer

#countryString?

Two-letter country code (ISO 3166-1 alpha-2) to bias results.

Parameters:

  • (String)

Returns:

  • (String, nil)


26
# File 'lib/telnyx/models/web_search_create_params.rb', line 26

optional :country, String

#exclude_domainsArray<String>?

Exclude results from these domains (bare hostnames, e.g. pinterest.com).

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


32
# File 'lib/telnyx/models/web_search_create_params.rb', line 32

optional :exclude_domains, Telnyx::Internal::Type::ArrayOf[String]

#freshnessString?

Time-based filter for results. Common values: day, week, month, year.

Parameters:

  • (String)

Returns:

  • (String, nil)


38
# File 'lib/telnyx/models/web_search_create_params.rb', line 38

optional :freshness, String

#include_domainsArray<String>?

Restrict results to these domains (bare hostnames, e.g. arxiv.org).

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


44
# File 'lib/telnyx/models/web_search_create_params.rb', line 44

optional :include_domains, Telnyx::Internal::Type::ArrayOf[String]

#livecrawlBoolean?

When true, the provider crawls pages in real-time for fresh content. The boolean is translated to the provider's internal enum internally; callers always pass true or false.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


52
# File 'lib/telnyx/models/web_search_create_params.rb', line 52

optional :livecrawl, Telnyx::Internal::Type::Boolean

#queryString

The search query text.

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/telnyx/models/web_search_create_params.rb', line 14

required :query, String

#safesearchSymbol, ...

Safe search filter level.



58
# File 'lib/telnyx/models/web_search_create_params.rb', line 58

optional :safesearch, enum: -> { Telnyx::WebSearchCreateParams::Safesearch }

Instance Method Details

#to_hash{

Returns:

  • ({)


64
# File 'sig/telnyx/models/web_search_create_params.rbs', line 64

def to_hash: -> {