class Starcall::Helpers::RegionParser
The API URLs don't use the actual region name, they used different ones. This converts from a region name to the URL string.
Public Class Methods
parse(region:)
click to toggle source
# File lib/starcall/helpers/region_parser.rb, line 10 def self.parse(region:) Starcall::Regions.valid?(region: region) region_matchup = { br: 'br1', eune: 'eun1', euw: 'euw1', lan: 'la1', las: 'la2', na: 'na1', oce: 'oc1', ru: 'ru', tr: 'tr1', jp: 'jp1', kr: 'kr' } region_matchup[region.to_sym] end