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.
25 lines
458 B
Ruby
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
|