agoragames / bnet_scraper

A Nokogiri-based scraper of Battle.net profiles. Currently this only includes Starcraft2.
MIT License
22 stars 7 forks source link

renamed bnet_index to subregion, removed guessing and added all known re... #6

Closed fx closed 11 years ago

fx commented 12 years ago

...gions and subregions instead

Now this will likely break implementations, as there is no longer a "us" region. I know we all like to ignore the fact that canada is part of the north american region, but it's time to embrace them with open arms now imo :)

cadwallion commented 12 years ago

I've been on vacation so pardon the lack of response, I'll review this today.

cadwallion commented 12 years ago

I like the rename to subregion, as it did not dawn on me that it indicates a subregion (as you can probably tell by the bnet_index name). However, I do not think that changing the region list is a good idea as these regions were already merged together under the five regions currently listed: na, eu, fea, sea, cn. No disrespect for Latin America, Russia, Korea, or Taiwan, but those regions don't exist anymore. I suspect the only reason the labels aren't updated accordingly is because of how Status uses label matching, and TL has outdated labels.

Perhaps a compromise can be made regarding subregions being listed inside a given region? Right now the only relevant difference between subregions is the subregion number in the URL pattern.

fx commented 12 years ago

I agree that representing correctly what battle.net does would be preferable, no matter how wrong it is geographically.

How about renaming REGIONS to GATEWAYS, add information that would potentially be useful when accessing these gateways (language restrictions come to mind) and giving each gateway its list of regions?

GATEWAYS = {
  us: {
    locales: [:en],
    subregions: {
      na: {id: 1, label: 'North America'}
    }
  }
}

That would be the most accurate representation of what's going on I'd say.

fx commented 11 years ago

Hey, sorry for stepping away here for two weeks - we've since decided to also simply represent everything exactly as battle.net does it anywhere, so I'll send along a new pull request with that update.

It's basically what I proposed above: gateway (us, sea, etc. - subdomain of battle.net) -> subregions

bbl!