Update blueprints to remove id field or identifier
This is built into ApiBlueprint
This commit is contained in:
parent
3b6edfae5d
commit
349c42f839
11 changed files with 21 additions and 29 deletions
|
|
@ -3,9 +3,6 @@
|
|||
module Api
|
||||
module V1
|
||||
class CharacterBlueprint < ApiBlueprint
|
||||
fields :id, :granblue_id, :character_id, :rarity,
|
||||
:element, :gender, :special
|
||||
|
||||
field :name do |w|
|
||||
{
|
||||
en: w.name_en,
|
||||
|
|
@ -13,6 +10,9 @@ module Api
|
|||
}
|
||||
end
|
||||
|
||||
fields :granblue_id, :character_id, :rarity,
|
||||
:element, :gender, :special
|
||||
|
||||
field :uncap do |w|
|
||||
{
|
||||
flb: w.flb,
|
||||
|
|
|
|||
|
|
@ -3,9 +3,6 @@
|
|||
module Api
|
||||
module V1
|
||||
class FavoriteBlueprint < ApiBlueprint
|
||||
identifier :id
|
||||
fields :created_at, :updated_at
|
||||
|
||||
association :user,
|
||||
name: :user,
|
||||
blueprint: UserBlueprint,
|
||||
|
|
@ -16,6 +13,8 @@ module Api
|
|||
blueprint: PartyBlueprint,
|
||||
view: :preview
|
||||
|
||||
fields :created_at, :updated_at
|
||||
|
||||
view :destroyed do
|
||||
field :destroyed do
|
||||
true
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
module Api
|
||||
module V1
|
||||
class GridCharacterBlueprint < ApiBlueprint
|
||||
identifier :id
|
||||
|
||||
view :uncap do
|
||||
association :party, blueprint: PartyBlueprint, view: :minimal
|
||||
fields :position, :uncap_level
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
module Api
|
||||
module V1
|
||||
class GridSummonBlueprint < ApiBlueprint
|
||||
identifier :id
|
||||
|
||||
view :uncap do
|
||||
association :party, blueprint: PartyBlueprint, view: :minimal
|
||||
fields :position, :uncap_level
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
module Api
|
||||
module V1
|
||||
class GridWeaponBlueprint < ApiBlueprint
|
||||
identifier :id
|
||||
|
||||
view :uncap do
|
||||
association :party, blueprint: PartyBlueprint, view: :minimal
|
||||
fields :position, :uncap_level
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
module Api
|
||||
module V1
|
||||
class JobBlueprint < ApiBlueprint
|
||||
fields :id, :row, :ml, :order
|
||||
|
||||
field :name do |job|
|
||||
{
|
||||
en: job.name_en,
|
||||
|
|
@ -18,6 +16,8 @@ module Api
|
|||
job.proficiency2
|
||||
]
|
||||
end
|
||||
|
||||
fields :row, :ml, :order
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,18 +3,18 @@
|
|||
module Api
|
||||
module V1
|
||||
class JobSkillBlueprint < ApiBlueprint
|
||||
fields :id, :slug, :color, :main, :base, :sub, :emp, :order
|
||||
|
||||
association :job,
|
||||
name: :job,
|
||||
blueprint: JobBlueprint
|
||||
|
||||
field :name do |skill|
|
||||
{
|
||||
en: skill.name_en,
|
||||
ja: skill.name_jp
|
||||
}
|
||||
end
|
||||
|
||||
association :job,
|
||||
name: :job,
|
||||
blueprint: JobBlueprint
|
||||
|
||||
fields :slug, :color, :main, :base, :sub, :emp, :order
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
module Api
|
||||
module V1
|
||||
class PartyBlueprint < ApiBlueprint
|
||||
identifier :id
|
||||
|
||||
view :weapons do
|
||||
association :weapons,
|
||||
blueprint: GridWeaponBlueprint,
|
||||
|
|
|
|||
|
|
@ -3,13 +3,14 @@
|
|||
module Api
|
||||
module V1
|
||||
class RaidBlueprint < ApiBlueprint
|
||||
fields :id, :slug, :level, :group, :element
|
||||
field :name do |raid|
|
||||
{
|
||||
en: raid.name_en,
|
||||
ja: raid.name_jp
|
||||
}
|
||||
end
|
||||
|
||||
fields :slug, :level, :group, :element
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
module Api
|
||||
module V1
|
||||
class SummonBlueprint < ApiBlueprint
|
||||
fields :id, :granblue_id, :element, :rarity, :max_level
|
||||
|
||||
field :name do |w|
|
||||
{
|
||||
en: w.name_en,
|
||||
|
|
@ -12,6 +10,8 @@ module Api
|
|||
}
|
||||
end
|
||||
|
||||
fields :granblue_id, :element, :rarity, :max_level
|
||||
|
||||
field :uncap do |w|
|
||||
{
|
||||
flb: w.flb,
|
||||
|
|
|
|||
|
|
@ -3,10 +3,6 @@
|
|||
module Api
|
||||
module V1
|
||||
class WeaponBlueprint < ApiBlueprint
|
||||
fields :id, :granblue_id, :element, :proficiency,
|
||||
:max_level, :max_skill_level, :limit, :rarity,
|
||||
:series, :ax
|
||||
|
||||
field :name do |w|
|
||||
{
|
||||
en: w.name_en,
|
||||
|
|
@ -14,6 +10,10 @@ module Api
|
|||
}
|
||||
end
|
||||
|
||||
fields :granblue_id, :element, :proficiency,
|
||||
:max_level, :max_skill_level, :limit, :rarity,
|
||||
:series, :ax
|
||||
|
||||
field :uncap do |w|
|
||||
{
|
||||
flb: w.flb,
|
||||
|
|
|
|||
Loading…
Reference in a new issue