Class: Ecfr::SearchService::ContentVersion::Count

Inherits:
Base show all
Defined in:
lib/ecfr/search_service/content_version/count.rb

Constant Summary collapse

COUNT_PATH =
"v1/count"

Constants inherited from Base

Base::SUPPORTED_ARRAY_ACCESSORS

Instance Attribute Summary collapse

Attributes inherited from Base

#metadata, #request_data, #response_status, #results

Class Method Summary collapse

Methods inherited from Base

base_url, service_name, service_path

Methods inherited from Base

basic_auth_client_options, #each, #initialize, metadata, metadata_key, result_key

Methods included from Extensible

#inherited

Methods included from AttributeMethodDefinition

included, #initialize

Methods inherited from Client

build, cache_key, client, client_pool, delete, execute, get, handle_response, perform, post, purge

Methods included from ParallelClient

included

Constructor Details

This class inherits a constructor from Ecfr::Base

Instance Attribute Details

#descriptionString (readonly)

description of the search results

Returns:

  • (String)


7
8
# File 'lib/ecfr/search_service/content_version/count.rb', line 7

 :description,
desc: "description of the search results"

#total_countInteger (readonly)

total count of matching results

Returns:

  • (Integer)


10
11
12
# File 'lib/ecfr/search_service/content_version/count.rb', line 10

 :total_count,
type: :integer,
desc: "total count of matching results"

Class Method Details

.find(args) ⇒ <Count>

Retrieves count metadata about a search query

Parameters:

Returns:

  • (<Count>)

    search query count metadata



23
24
25
26
27
28
29
# File 'lib/ecfr/search_service/content_version/count.rb', line 23

def self.find(args)
  perform(
    :get,
    COUNT_PATH,
    params: args
  )
end