hensei-api/app/blueprints/api/v1/raid_blueprint.rb

26 lines
464 B
Ruby

# frozen_string_literal: true
module Api
module V1
class RaidBlueprint < ApiBlueprint
view :nested do
identifier :id
field :name do |raid|
{
en: raid.name_en,
ja: raid.name_jp
}
end
fields :slug, :level, :element
association :group, blueprint: RaidGroupBlueprint, view: :flat
end
view :full do
include_view :nested
end
end
end
end