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
460 B
Ruby
25 lines
460 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Granblue
|
|
module Downloader
|
|
class CharacterDownloader < BaseDownloader
|
|
private
|
|
|
|
def object_type
|
|
'character'
|
|
end
|
|
|
|
def base_url
|
|
'http://gbf.game-a.mbga.jp/assets/img/sp/assets/npc'
|
|
end
|
|
|
|
def directory_for_size(size)
|
|
case size.to_s
|
|
when 'main' then 'f'
|
|
when 'grid' then 'm'
|
|
when 'square' then 's'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|