Class: ContextDev::Models::NewsSearchParams::FilterBy

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/news_search_params.rb,
sig/context_dev/models/news_search_params.rbs

Defined Under Namespace

Modules: ArticleLanguage, ArticleType, SourceCountry Classes: Date

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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(from: nil, to: nil) ⇒ Object

Published-at window in epoch milliseconds.

Parameters:

  • from (Integer) (defaults to: nil)

    Inclusive start of the published-at window, in epoch milliseconds.

  • to (Integer) (defaults to: nil)

    Inclusive end of the published-at window, in epoch milliseconds.



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

Instance Attribute Details

#article_languageArray<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::ArticleLanguage>?

Article languages to include. Up to 3.



300
301
302
303
304
# File 'lib/context_dev/models/news_search_params.rb', line 300

optional :article_language,
-> {
  ContextDev::Internal::Type::ArrayOf[enum: ContextDev::NewsSearchParams::FilterBy::ArticleLanguage]
},
api_name: :articleLanguage

#article_typeArray<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::ArticleType>?

Article types to include. Up to 3.



310
311
312
313
314
# File 'lib/context_dev/models/news_search_params.rb', line 310

optional :article_type,
-> {
  ContextDev::Internal::Type::ArrayOf[enum: ContextDev::NewsSearchParams::FilterBy::ArticleType]
},
api_name: :articleType

#dateContextDev::Models::NewsSearchParams::FilterBy::Date?

Published-at window in epoch milliseconds.



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

optional :date, -> { ContextDev::NewsSearchParams::FilterBy::Date }

#source_countryArray<Symbol, ContextDev::Models::NewsSearchParams::FilterBy::SourceCountry>?

Publisher countries to include, as lowercase ISO 3166-1 alpha-2 codes. Up to 3.



326
327
328
329
330
# File 'lib/context_dev/models/news_search_params.rb', line 326

optional :source_country,
-> {
  ContextDev::Internal::Type::ArrayOf[enum: ContextDev::NewsSearchParams::FilterBy::SourceCountry]
},
api_name: :sourceCountry

#source_domainArray<String>?

Publisher domains to include. Up to 3.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


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

optional :source_domain, ContextDev::Internal::Type::ArrayOf[String], api_name: :sourceDomain

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {