Refactor micropub specific things out to a slice
This commit is contained in:
19
slices/micropub/entities/bookmark_request.rb
Normal file
19
slices/micropub/entities/bookmark_request.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
module Micropub
|
||||
module Entities
|
||||
class BookmarkRequest < Dry::Struct
|
||||
attribute :h, Types::Coercible::String
|
||||
attribute :action, Types::Coercible::String.optional
|
||||
attribute :name, Types::Coercible::String
|
||||
attribute :cache, Types::Params::Bool.optional
|
||||
attribute :content, Types::Coercible::String.optional
|
||||
attribute :url, Types::Coercible::String
|
||||
attribute :slug, Types::Coercible::String
|
||||
attribute :category, Types::Array.of(Types::Coercible::String)
|
||||
attribute :published_at, Types::Nominal::DateTime.optional
|
||||
attribute :post_type, Types::Coercible::String
|
||||
attribute :syndicate_to, Types::Array.of(Types::Coercible::String)
|
||||
attribute :photos, Types::Array.of(Types::Hash)
|
||||
attribute :location, Types::Coercible::String.optional
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user