Initial commit
This commit is contained in:
commit
9c4856bdb1
73 changed files with 1393 additions and 0 deletions
21
app/api/mastodon/entities.rb
Normal file
21
app/api/mastodon/entities.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
module Mastodon
|
||||
module Entities
|
||||
class Account < Grape::Entity
|
||||
expose :username
|
||||
expose :domain
|
||||
end
|
||||
|
||||
class Status < Grape::Entity
|
||||
format_with(:iso_timestamp) { |dt| dt.iso8601 }
|
||||
|
||||
expose :uri
|
||||
expose :text
|
||||
expose :account, using: Mastodon::Entities::Account
|
||||
|
||||
with_options(format_with: :iso_timestamp) do
|
||||
expose :created_at
|
||||
expose :updated_at
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue