-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add missing
returned
attribute for some summary models (#5)
- Loading branch information
Showing
6 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
module Harkness | ||
# The summary of a creator. | ||
class CreatorSummary < Harkness::Base::Summary | ||
# @!attribute [r] role | ||
# @return [String] the role of the creator in the parent entity. | ||
attribute :role, Shale::Type::String | ||
end | ||
|
||
# A list of creators. | ||
class CreatorList < Shale::Mapper | ||
# @!attribute [r] available | ||
# @return [Integer] the number of total available creators in this list. | ||
# Will always be greater than or equal to the "returned" value. | ||
attribute :available, Shale::Type::Integer | ||
# @!attribute [r] returned | ||
# @return [Integer] the number of creators returned in this collection (up to 20). | ||
attribute :returned, Shale::Type::Integer | ||
# @!attribute [r] collectionURI | ||
# @return [String] the path to the full list of creators in this collection. | ||
attribute :collectionURI, Shale::Type::String | ||
# @!attribute [r] offset | ||
# @return [Array<Harkness::CreatorySummary>] the list of returned creators in this collection. | ||
attribute :items, Harkness::CreatorSummary, collection: true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
module Harkness | ||
# The summary of a series. | ||
class SeriesSummary < Harkness::Base::Summary | ||
end | ||
|
||
# A list of series. | ||
class SeriesList < Shale::Mapper | ||
# @!attribute [r] available | ||
# @return [Integer] the number of total available series in this list. | ||
# Will always be greater than or equal to the "returned" value. | ||
attribute :available, Shale::Type::Integer | ||
# @!attribute [r] returned | ||
# @return [Integer] the number of series returned in this collection (up to 20). | ||
attribute :returned, Shale::Type::Integer | ||
# @!attribute [r] collectionURI | ||
# @return [String] the path to the full list of series in this collection. | ||
attribute :collectionURI, Shale::Type::String | ||
# @!attribute [r] items | ||
# @return [Array<Harkness::SeriesSummary>] the list of returned characters in this collection. | ||
attribute :items, Harkness::SeriesSummary, collection: true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
module Harkness | ||
# The summary of a story. | ||
class StorySummary < Harkness::Base::Summary | ||
# @!attribute [r] type | ||
# @return [String] the type of the story (interior or cover) | ||
attribute :type, Shale::Type::String | ||
end | ||
|
||
# A list of stories. | ||
class StoryList < Shale::Mapper | ||
# @!attribute [r] available | ||
# @return [Integer] the number of total available stories in this list. | ||
# Will always be greater than or equal to the "returned" value. | ||
attribute :available, Shale::Type::Integer | ||
# @!attribute [r] returned | ||
# @return [Integer] the number of stories returned in this collection (up to 20). | ||
attribute :returned, Shale::Type::Integer | ||
# @!attribute [r] collectionURI | ||
# @return [String] the path to the full list of stories in this collection. | ||
attribute :collectionURI, Shale::Type::String | ||
# @!attribute [r] items | ||
# @return [Array<Harkness::StorySummary>] the list of returned characters in this collection. | ||
attribute :items, Harkness::StorySummary, collection: true | ||
end | ||
end |