Class: Ecfr::VersionerService::IssuePackage

Inherits:
Base show all
Defined in:
lib/ecfr/versioner_service/issue_package.rb,
lib/ecfr/versioner_service/issue_package/issue_volume.rb,
lib/ecfr/versioner_service/issue_package/title_version.rb,
lib/ecfr/versioner_service/issue_package/sha_comparison.rb

Overview

NOTE: IssuePackages are an internal API and are not publicly accessible

Issue packages represent the data we receive from our upstream datasource and we then process into XML for ingestion. Various SHAs are calculated to allow for error checking and discrepency identification against the GPO bulk data XML.

Each issue package will contain a file for each volume in each title that are changing in that issue.

Defined Under Namespace

Classes: IssueVolume, ShaComparison, TitleVersion

Constant Summary collapse

ISSUE_PACKAGES_PATH =
"v1/issue_packages"

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

#idInteger (readonly)

issue pacakge database id

Returns:

  • (Integer)


17
18
19
# File 'lib/ecfr/versioner_service/issue_package.rb', line 17

attribute :id,
type: :integer,
desc: "issue pacakge database id"

#issue_dateDate (readonly)

issue date this package represents

Returns:

  • (Date)


21
22
23
# File 'lib/ecfr/versioner_service/issue_package.rb', line 21

attribute :issue_date,
type: :date,
desc: "issue date this package represents"

#issue_volumes[IssueVolume] (readonly)

array of the volumes in this issue package

Returns:



25
26
27
# File 'lib/ecfr/versioner_service/issue_package.rb', line 25

attribute :issue_volumes,
type: Array(IssueVolume),
desc: "array of the volumes in this issue package"

#received_atDatetime (readonly)

when this issue package was received

Returns:

  • (Datetime)


29
30
31
# File 'lib/ecfr/versioner_service/issue_package.rb', line 29

attribute :received_at,
type: :datetime,
desc: "when this issue package was received"

Class Method Details

.all<IssuePackage>

Retreives the list of Issue Packages from the last 30 days

Issue Volumes

Returns:

  • (<IssuePackage>)

    array of Issue Packages and associated



41
42
43
44
45
46
# File 'lib/ecfr/versioner_service/issue_package.rb', line 41

def self.all
  perform(
    :get,
    ISSUE_PACKAGES_PATH
  )
end