diff --git a/app/views/api/v1/api/errors.json.rabl b/app/views/api/v1/api/errors.json.rabl deleted file mode 100644 index 78c87ff..0000000 --- a/app/views/api/v1/api/errors.json.rabl +++ /dev/null @@ -1,18 +0,0 @@ -object false - -node :errors do - if @exception.respond_to?(:record) - errors = ValidationErrorsSerializer.new(@exception.record).serialize - end - - if @exception.respond_to?(:message) && @exception.respond_to?(:code) - errors = [ - { - message: @exception.message, - code: @exception.code - } - ] - end - - errors -end diff --git a/app/views/api/v1/api/not_found.json.rabl b/app/views/api/v1/api/not_found.json.rabl deleted file mode 100644 index 9bc7b58..0000000 --- a/app/views/api/v1/api/not_found.json.rabl +++ /dev/null @@ -1,8 +0,0 @@ -object false - -node(:errors) do - { - 'message': "Record could not be found.", - 'code': 'not_found' - } -end \ No newline at end of file diff --git a/app/views/api/v1/characters/base.json.rabl b/app/views/api/v1/characters/base.json.rabl deleted file mode 100644 index 47976a3..0000000 --- a/app/views/api/v1/characters/base.json.rabl +++ /dev/null @@ -1,68 +0,0 @@ -object :character - -attributes :id, - :granblue_id, - :character_id, - :rarity, - :element, - :gender, - :max_level, - :special - -node :name do |w| - { - :en => w.name_en, - :ja => w.name_jp - } -end - -node :uncap do |w| - { - :flb => w.flb, - :ulb => w.ulb - } -end - -node :hp do |w| - { - :min_hp => w.min_hp, - :max_hp => w.max_hp, - :max_hp_flb => w.max_hp_flb - } -end - -node :atk do |w| - { - :min_atk => w.min_atk, - :max_atk => w.max_atk, - :max_atk_flb => w.max_atk_flb - } -end - -node :race do |w| - [ - w.race1, - w.race2 - ] -end - -node :proficiency do |w| - [ - w.proficiency1, - w.proficiency2 - ] -end - -node :data do |w| - { - :base_da => w.base_da, - :base_ta => w.base_ta, - } -end - -node :ougi_ratio do |w| - { - :ougi_ratio => w.ougi_ratio, - :ougi_ratio_flb => w.ougi_ratio_flb - } -end diff --git a/app/views/api/v1/favorites/base.json.rabl b/app/views/api/v1/favorites/base.json.rabl deleted file mode 100644 index e7525b8..0000000 --- a/app/views/api/v1/favorites/base.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -object :favorite - -attributes :id, :user_id, :party_id, :created_at, :updated_at diff --git a/app/views/api/v1/favorites/destroyed.json.rabl b/app/views/api/v1/favorites/destroyed.json.rabl deleted file mode 100644 index f791b2f..0000000 --- a/app/views/api/v1/favorites/destroyed.json.rabl +++ /dev/null @@ -1,5 +0,0 @@ -object false - -node :destroyed do - true -end \ No newline at end of file diff --git a/app/views/api/v1/favorites/show.json.rabl b/app/views/api/v1/favorites/show.json.rabl deleted file mode 100644 index 2b85585..0000000 --- a/app/views/api/v1/favorites/show.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -object @favorite - -extends 'api/v1/favorites/base' \ No newline at end of file diff --git a/app/views/api/v1/grid_characters/base.json.rabl b/app/views/api/v1/grid_characters/base.json.rabl deleted file mode 100644 index 74e9ec1..0000000 --- a/app/views/api/v1/grid_characters/base.json.rabl +++ /dev/null @@ -1,9 +0,0 @@ -attributes :id, - :party_id, - :position, - :uncap_level, - :perpetuity - -node :object do |c| - partial("characters/base", :object => c.character) -end \ No newline at end of file diff --git a/app/views/api/v1/grid_characters/conflict.json.rabl b/app/views/api/v1/grid_characters/conflict.json.rabl deleted file mode 100644 index e67e0fc..0000000 --- a/app/views/api/v1/grid_characters/conflict.json.rabl +++ /dev/null @@ -1,14 +0,0 @@ -object false - -node :conflicts do - partial('grid_characters/base', :object => @conflict_characters) -end - -node :incoming do - partial('characters/base', :object => @incoming_character) -end - -node :position do - @incoming_position -end - \ No newline at end of file diff --git a/app/views/api/v1/grid_characters/show.json.rabl b/app/views/api/v1/grid_characters/show.json.rabl deleted file mode 100644 index ca858d8..0000000 --- a/app/views/api/v1/grid_characters/show.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -object @character - -extends 'api/v1/grid_characters/base' \ No newline at end of file diff --git a/app/views/api/v1/grid_summons/base.json.rabl b/app/views/api/v1/grid_summons/base.json.rabl deleted file mode 100644 index 8a20ce9..0000000 --- a/app/views/api/v1/grid_summons/base.json.rabl +++ /dev/null @@ -1,10 +0,0 @@ -attributes :id, - :party_id, - :main, - :friend, - :position, - :uncap_level - -node :object do |s| - partial('summons/base', :object => s.summon) -end \ No newline at end of file diff --git a/app/views/api/v1/grid_summons/show.json.rabl b/app/views/api/v1/grid_summons/show.json.rabl deleted file mode 100644 index 07c4dcb..0000000 --- a/app/views/api/v1/grid_summons/show.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -object @summon - -extends 'api/v1/grid_summons/base' \ No newline at end of file diff --git a/app/views/api/v1/grid_weapons/base.json.rabl b/app/views/api/v1/grid_weapons/base.json.rabl deleted file mode 100644 index 36b5c87..0000000 --- a/app/views/api/v1/grid_weapons/base.json.rabl +++ /dev/null @@ -1,27 +0,0 @@ -attributes :id, - :party_id, - :mainhand, - :position, - :uncap_level, - :element - -node :object do |w| - partial("weapons/base", :object => w.weapon) -end - -node :weapon_keys, :if => lambda { |w| [2, 3, 17, 22].include?(w.weapon.series) } do |w| - partial("weapon_keys/base", :object => w.weapon_keys) -end - -node :ax, :if => lambda { |w| w.weapon.ax > 0 } do |w| - [ - { - :modifier => w.ax_modifier1, - :strength => w.ax_strength1 - }, - { - :modifier => w.ax_modifier2, - :strength => w.ax_strength2 - } - ] -end \ No newline at end of file diff --git a/app/views/api/v1/grid_weapons/show.json.rabl b/app/views/api/v1/grid_weapons/show.json.rabl deleted file mode 100644 index cd450b3..0000000 --- a/app/views/api/v1/grid_weapons/show.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -object @weapon - -extends 'api/v1/grid_weapons/base' \ No newline at end of file diff --git a/app/views/api/v1/grid_weapons/update.json.rabl b/app/views/api/v1/grid_weapons/update.json.rabl deleted file mode 100644 index cd450b3..0000000 --- a/app/views/api/v1/grid_weapons/update.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -object @weapon - -extends 'api/v1/grid_weapons/base' \ No newline at end of file diff --git a/app/views/api/v1/job_skills/all.json.rabl b/app/views/api/v1/job_skills/all.json.rabl deleted file mode 100644 index ba30a1c..0000000 --- a/app/views/api/v1/job_skills/all.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -collection @skills, object_root: false - -extends 'job_skills/base' diff --git a/app/views/api/v1/job_skills/base.json.rabl b/app/views/api/v1/job_skills/base.json.rabl deleted file mode 100644 index 03c6f1e..0000000 --- a/app/views/api/v1/job_skills/base.json.rabl +++ /dev/null @@ -1,10 +0,0 @@ -object :job_skill - -attributes :id, :job, :slug, :color, :main, :base, :sub, :emp, :order - -node :name do |w| - { - :en => w.name_en, - :ja => w.name_jp - } -end diff --git a/app/views/api/v1/jobs/all.json.rabl b/app/views/api/v1/jobs/all.json.rabl deleted file mode 100644 index f39bf78..0000000 --- a/app/views/api/v1/jobs/all.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -collection @jobs, object_root: false - -extends 'jobs/base' diff --git a/app/views/api/v1/jobs/base.json.rabl b/app/views/api/v1/jobs/base.json.rabl deleted file mode 100644 index c806683..0000000 --- a/app/views/api/v1/jobs/base.json.rabl +++ /dev/null @@ -1,17 +0,0 @@ -object :job - -attributes :id, :row, :ml, :order - -node :name do |j| - { - :en => j.name_en, - :ja => j.name_jp - } -end - -node :proficiency do |j| - [ - j.proficiency1, - j.proficiency2 - ] -end \ No newline at end of file diff --git a/app/views/api/v1/jobs/update.json.rabl b/app/views/api/v1/jobs/update.json.rabl deleted file mode 100644 index 6cb851f..0000000 --- a/app/views/api/v1/jobs/update.json.rabl +++ /dev/null @@ -1,20 +0,0 @@ -object @party - -attributes :id, :user_id, :shortcode - -node :is_extra do |p| - p.extra -end - -node :job do |p| - partial("jobs/base", object: p.job) -end - -node :job_skills do |p| - { - "0" => partial("job_skills/base", object: p.skill0), - "1" => partial("job_skills/base", object: p.skill1), - "2" => partial("job_skills/base", object: p.skill2), - "3" => partial("job_skills/base", object: p.skill3), - } -end diff --git a/app/views/api/v1/parties/all.json.rabl b/app/views/api/v1/parties/all.json.rabl deleted file mode 100644 index 44d8477..0000000 --- a/app/views/api/v1/parties/all.json.rabl +++ /dev/null @@ -1,11 +0,0 @@ -node :count do - @count -end - -node :total_pages do - (@count.to_f / @per_page > 1) ? (@count.to_f / @per_page).ceil() : 1 -end - -node(:results) { - partial('parties/base', object: @parties) -} unless @parties.empty? diff --git a/app/views/api/v1/parties/base.json.rabl b/app/views/api/v1/parties/base.json.rabl deleted file mode 100644 index 364c711..0000000 --- a/app/views/api/v1/parties/base.json.rabl +++ /dev/null @@ -1,47 +0,0 @@ -object :party - -attributes :id, - :name, - :description, - :element, - :favorited, - :shortcode, - :created_at, - :updated_at - -node :extra do |p| - p.extra -end - -node :user do |p| - partial("users/base", object: p.user) -end - -node :raid do |p| - partial("raids/base", object: p.raid) -end - -node :job do |p| - partial("jobs/base", object: p.job) -end - -node :job_skills do |p| - { - "0" => partial("job_skills/base", object: p.skill0), - "1" => partial("job_skills/base", object: p.skill1), - "2" => partial("job_skills/base", object: p.skill2), - "3" => partial("job_skills/base", object: p.skill3), - } -end - -node :characters do |p| - partial("grid_characters/base", object: p.characters) -end - -node :weapons do |p| - partial("grid_weapons/base", object: p.weapons) -end - -node :summons do |p| - partial("grid_summons/base", object: p.summons) -end diff --git a/app/views/api/v1/parties/characters.json.rabl b/app/views/api/v1/parties/characters.json.rabl deleted file mode 100644 index e19cb56..0000000 --- a/app/views/api/v1/parties/characters.json.rabl +++ /dev/null @@ -1,15 +0,0 @@ -object @party - -attributes :id, :name, :description, :shortcode, :favorited, :created_at, :updated_at - -node :user do |p| - partial('users/base', :object => p.user) -end - -node :raid do |p| - partial('raids/base', :object => p.raid) -end - -node :characters do |p| - partial('grid_characters/base', :object => p.characters) -end diff --git a/app/views/api/v1/parties/destroyed.json.rabl b/app/views/api/v1/parties/destroyed.json.rabl deleted file mode 100644 index f791b2f..0000000 --- a/app/views/api/v1/parties/destroyed.json.rabl +++ /dev/null @@ -1,5 +0,0 @@ -object false - -node :destroyed do - true -end \ No newline at end of file diff --git a/app/views/api/v1/parties/show.json.rabl b/app/views/api/v1/parties/show.json.rabl deleted file mode 100644 index 88809bc..0000000 --- a/app/views/api/v1/parties/show.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -object @party - -extends 'api/v1/parties/base' \ No newline at end of file diff --git a/app/views/api/v1/parties/summons.json.rabl b/app/views/api/v1/parties/summons.json.rabl deleted file mode 100644 index d823f06..0000000 --- a/app/views/api/v1/parties/summons.json.rabl +++ /dev/null @@ -1,15 +0,0 @@ -object @party - -attributes :id, :name, :description, :shortcode, :favorited, :created_at, :updated_at - -node :user do |p| - partial('users/base', :object => p.user) -end - -node :raid do |p| - partial('raids/base', :object => p.raid) -end - -node :summons do |p| - partial('grid_summons/base', :object => p.summons) -end diff --git a/app/views/api/v1/parties/update.json.rabl b/app/views/api/v1/parties/update.json.rabl deleted file mode 100644 index 6cb851f..0000000 --- a/app/views/api/v1/parties/update.json.rabl +++ /dev/null @@ -1,20 +0,0 @@ -object @party - -attributes :id, :user_id, :shortcode - -node :is_extra do |p| - p.extra -end - -node :job do |p| - partial("jobs/base", object: p.job) -end - -node :job_skills do |p| - { - "0" => partial("job_skills/base", object: p.skill0), - "1" => partial("job_skills/base", object: p.skill1), - "2" => partial("job_skills/base", object: p.skill2), - "3" => partial("job_skills/base", object: p.skill3), - } -end diff --git a/app/views/api/v1/parties/weapons.json.rabl b/app/views/api/v1/parties/weapons.json.rabl deleted file mode 100644 index 3722385..0000000 --- a/app/views/api/v1/parties/weapons.json.rabl +++ /dev/null @@ -1,19 +0,0 @@ -object @party - -attributes :id, :name, :description, :shortcode, :favorited, :created_at, :updated_at - -node :user do |p| - partial('users/base', :object => p.user) -end - -node :raid do |p| - partial('raids/base', :object => p.raid) -end - -node :extra do |p| - p.extra -end - -node :weapons do |p| - partial('grid_weapons/base', :object => p.weapons) -end diff --git a/app/views/api/v1/raids/all.json.rabl b/app/views/api/v1/raids/all.json.rabl deleted file mode 100644 index b6abde3..0000000 --- a/app/views/api/v1/raids/all.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -collection @raids - -extends 'raids/base' diff --git a/app/views/api/v1/raids/base.json.rabl b/app/views/api/v1/raids/base.json.rabl deleted file mode 100644 index 362a5df..0000000 --- a/app/views/api/v1/raids/base.json.rabl +++ /dev/null @@ -1,10 +0,0 @@ -object :raid - -attributes :id, :slug, :level, :group, :element - -node :name do |r| - { - :en => r.name_en, - :ja => r.name_jp - } -end \ No newline at end of file diff --git a/app/views/api/v1/search/characters.json.rabl b/app/views/api/v1/search/characters.json.rabl deleted file mode 100644 index ab551fa..0000000 --- a/app/views/api/v1/search/characters.json.rabl +++ /dev/null @@ -1,11 +0,0 @@ -node :count do - @count -end - -node :total_pages do - (@count.to_f / 10 > 1) ? (@count.to_f / 10).ceil() : 1 -end - -node(:results) { - partial('characters/base', object: @characters) -} unless @characters.empty? diff --git a/app/views/api/v1/search/job_skills.json.rabl b/app/views/api/v1/search/job_skills.json.rabl deleted file mode 100644 index 100cca8..0000000 --- a/app/views/api/v1/search/job_skills.json.rabl +++ /dev/null @@ -1,11 +0,0 @@ -node :count do - @count -end - -node :total_pages do - (@count.to_f / 10 > 1) ? (@count.to_f / 10).ceil() : 1 -end - -node(:results) { - partial('job_skills/base', object: @skills) -} unless @skills.empty? diff --git a/app/views/api/v1/search/summons.json.rabl b/app/views/api/v1/search/summons.json.rabl deleted file mode 100644 index 073eb1e..0000000 --- a/app/views/api/v1/search/summons.json.rabl +++ /dev/null @@ -1,11 +0,0 @@ -node :count do - @count -end - -node :total_pages do - (@count.to_f / 10 > 1) ? (@count.to_f / 10).ceil() : 1 -end - -node(:results) { - partial('summons/base', object: @summons) -} unless @summons.empty? diff --git a/app/views/api/v1/search/weapons.json.rabl b/app/views/api/v1/search/weapons.json.rabl deleted file mode 100644 index b759323..0000000 --- a/app/views/api/v1/search/weapons.json.rabl +++ /dev/null @@ -1,11 +0,0 @@ -node :count do - @count -end - -node :total_pages do - (@count.to_f / 10 > 1) ? (@count.to_f / 10).ceil() : 1 -end - -node(:results) { - partial('weapons/base', object: @weapons) -} unless @weapons.empty? diff --git a/app/views/api/v1/summons/base.json.rabl b/app/views/api/v1/summons/base.json.rabl deleted file mode 100644 index 3811753..0000000 --- a/app/views/api/v1/summons/base.json.rabl +++ /dev/null @@ -1,39 +0,0 @@ -object :summon - -attributes :id, - :granblue_id, - :element, - :rarity, - :max_level - -node :name do |w| - { - :en => w.name_en, - :ja => w.name_jp - } -end - -node :uncap do |w| - { - :flb => w.flb, - :ulb => w.ulb - } -end - -node :hp do |w| - { - :min_hp => w.min_hp, - :max_hp => w.max_hp, - :max_hp_flb => w.max_hp_flb, - :max_hp_ulb => w.max_hp_ulb - } -end - -node :atk do |w| - { - :min_atk => w.min_atk, - :max_atk => w.max_atk, - :max_atk_flb => w.max_atk_flb, - :max_atk_ulb => w.max_atk_ulb - } -end \ No newline at end of file diff --git a/app/views/api/v1/users/available.json.rabl b/app/views/api/v1/users/available.json.rabl deleted file mode 100644 index 4efcddb..0000000 --- a/app/views/api/v1/users/available.json.rabl +++ /dev/null @@ -1,5 +0,0 @@ -object false - -node(:available) { - @available -} \ No newline at end of file diff --git a/app/views/api/v1/users/base.json.rabl b/app/views/api/v1/users/base.json.rabl deleted file mode 100644 index 642c3f8..0000000 --- a/app/views/api/v1/users/base.json.rabl +++ /dev/null @@ -1,15 +0,0 @@ -object :user - -attributes :id, - :username, - :granblue_id, - :language, - :private, - :gender - -node :picture do |u| - { - :picture => u.picture, - :element => u.element - } -end \ No newline at end of file diff --git a/app/views/api/v1/users/create.json.rabl b/app/views/api/v1/users/create.json.rabl deleted file mode 100644 index cea7c27..0000000 --- a/app/views/api/v1/users/create.json.rabl +++ /dev/null @@ -1,9 +0,0 @@ -object false - -node(:user) { - @presenter -} unless @user.blank? - -node(:error) { - @error -} unless @error.blank? diff --git a/app/views/api/v1/users/info.json.rabl b/app/views/api/v1/users/info.json.rabl deleted file mode 100644 index b10685a..0000000 --- a/app/views/api/v1/users/info.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -object @user - -extends 'api/v1/users/base' \ No newline at end of file diff --git a/app/views/api/v1/users/show.json.rabl b/app/views/api/v1/users/show.json.rabl deleted file mode 100644 index 9a729da..0000000 --- a/app/views/api/v1/users/show.json.rabl +++ /dev/null @@ -1,19 +0,0 @@ -object false - -node :user do - partial('users/base', object: @user) -end - -child :parties do - node :count do - @count - end - - node :total_pages do - (@count.to_f / @per_page > 1) ? (@count.to_f / @per_page).ceil() : 1 - end - - node :results do - partial('parties/base', object: @parties) - end unless @parties.empty? -end \ No newline at end of file diff --git a/app/views/api/v1/weapon_keys/all.json.rabl b/app/views/api/v1/weapon_keys/all.json.rabl deleted file mode 100644 index f631ea6..0000000 --- a/app/views/api/v1/weapon_keys/all.json.rabl +++ /dev/null @@ -1,3 +0,0 @@ -collection @keys - -extends 'weapon_keys/base' diff --git a/app/views/api/v1/weapon_keys/base.json.rabl b/app/views/api/v1/weapon_keys/base.json.rabl deleted file mode 100644 index 033be8e..0000000 --- a/app/views/api/v1/weapon_keys/base.json.rabl +++ /dev/null @@ -1,10 +0,0 @@ -object :weapon_key - -attributes :id, :series, :slot, :group, :order - -node :name do |k| - { - :en => k.name_en, - :ja => k.name_jp - } -end \ No newline at end of file diff --git a/app/views/api/v1/weapons/base.json.rabl b/app/views/api/v1/weapons/base.json.rabl deleted file mode 100644 index 05b1bc5..0000000 --- a/app/views/api/v1/weapons/base.json.rabl +++ /dev/null @@ -1,44 +0,0 @@ -object :weapon - -attributes :id, - :granblue_id, - :element, - :proficiency, - :max_level, - :max_skill_level, - :limit, - :rarity, - :series, - :ax - -node :name do |w| - { - :en => w.name_en, - :ja => w.name_jp - } -end - -node :uncap do |w| - { - :flb => w.flb, - :ulb => w.ulb - } -end - -node :hp do |w| - { - :min_hp => w.min_hp, - :max_hp => w.max_hp, - :max_hp_flb => w.max_hp_flb, - :max_hp_ulb => w.max_hp_ulb - } -end - -node :atk do |w| - { - :min_atk => w.min_atk, - :max_atk => w.max_atk, - :max_atk_flb => w.max_atk_flb, - :max_atk_ulb => w.max_atk_ulb - } -end \ No newline at end of file