Class: ContextDev::Models::NewsSearchParams

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

Overview

See Also:

  • ContextDev::Resources::News#search

Defined Under Namespace

Classes: FilterBy, SearchBy, SortBy

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::ContextDev

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

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

#initializeObject



42
# File 'sig/context_dev/models/news_search_params.rbs', line 42

def initialize: (

Instance Attribute Details

#cursorString?

Opaque next_cursor from the previous response, or null for the first page.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


20
# File 'lib/context_dev/models/news_search_params.rb', line 20

optional :cursor, String, nil?: true

#filter_byContextDev::Models::NewsSearchParams::FilterBy?

Optional result filters.



26
# File 'lib/context_dev/models/news_search_params.rb', line 26

optional :filter_by, -> { ContextDev::NewsSearchParams::FilterBy }, api_name: :filterBy

#limitInteger?

Maximum results to return. Defaults to 10.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


32
# File 'lib/context_dev/models/news_search_params.rb', line 32

optional :limit, Integer

#search_byContextDev::Models::NewsSearchParams::SearchBy

What to search for.

Parameters:

  • value (ContextDev::NewsSearchParams::SearchBy)

Returns:



14
# File 'lib/context_dev/models/news_search_params.rb', line 14

required :search_by, -> { ContextDev::NewsSearchParams::SearchBy }, api_name: :searchBy

#sort_byContextDev::Models::NewsSearchParams::SortBy?

Result ordering. Defaults to newest.



38
# File 'lib/context_dev/models/news_search_params.rb', line 38

optional :sort_by, -> { ContextDev::NewsSearchParams::SortBy }, api_name: :sortBy

#tagsArray<String>?

Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


44
# File 'lib/context_dev/models/news_search_params.rb', line 44

optional :tags, ContextDev::Internal::Type::ArrayOf[String]

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/context_dev/models/news_search_params.rb', line 290

Instance Method Details

#to_hash{

Returns:

  • ({)


52
# File 'sig/context_dev/models/news_search_params.rbs', line 52

def to_hash: -> {