hensei-api/lib/granblue/downloaders/weapon_downloader.rb
Justin Edmund 551c2609b0 Add downloaders
Downloaders take Granblue IDs and download images for those items from the Granblue Fantasy server in all relevant sizes.

Downloaders can download to disk or stream the file directly to S3.
2025-01-12 16:02:51 -08:00

25 lines
458 B
Ruby

# frozen_string_literal: true
module Granblue
module Downloader
class WeaponDownloader < BaseDownloader
private
def object_type
'weapon'
end
def base_url
'http://gbf.game-a.mbga.jp/assets/img/sp/assets/weapon'
end
def directory_for_size(size)
case size.to_s
when 'main' then 'ls'
when 'grid' then 'm'
when 'square' then 's'
end
end
end
end
end