Ability to check if Battle.net is online for a region #3

Merged
merged 1 commit into from Apr 13, 2012

Conversation

Projects
None yet
2 participants
@logankoester
Contributor

logankoester commented Apr 13, 2012

Ask the TL.net bot if Battle.net is currently online for a given region.
This page is updated every 5 minutes. Call #fetch to refresh.

Examples:

BnetScraper::Starcraft2::Status.na  => 'Online'
BnetScraper::Starcraft2::Status.fea => 'Offline'
BnetScraper::Starcraft2::Status.cn  => nil (China is unsupported)
BnetScraper::Starcraft2::Status.fetch => [
  {:region=>"North America", :status=>"Online"},{:region=>"Europe", :status=>"Online"},
  {:region=>"Korea", :status=>"Online"}, {:region=>"South-East Asia", :status=>"Online"}
]
-FakeWeb.register_uri :get, 'http://us.battle.net/sc2/en/profile/2377239/1/Demon/ladder/98936', body: league_html, status: 200, content_type: 'text/html'
-FakeWeb.register_uri :get, 'http://us.battle.net/sc2/en/profile/2377239/1/Demon/achievements/', body: achievements_html, status: 200, content_type: 'text/html'
-FakeWeb.register_uri :get, 'http://us.battle.net/sc2/en/profile/2377239/1/Demon/matches', body: matches_html, status: 200, content_type: 'text/html'
+FakeWeb.register_uri :get, 'http://us.battle.net/sc2/en/profile/2377239/1/Demon/ladder/12345', body: league_html, status: 200, content_type: 'text/html'

This comment has been minimized.

@logankoester

logankoester Apr 13, 2012

Contributor

Sorry about this diff, just realignment. The only change is the addtion of line 28.

@logankoester

logankoester Apr 13, 2012

Contributor

Sorry about this diff, just realignment. The only change is the addtion of line 28.

@cadwallion

This comment has been minimized.

Show comment
Hide comment
@cadwallion

cadwallion Apr 13, 2012

Contributor

Looks good.

Contributor

cadwallion commented Apr 13, 2012

Looks good.

cadwallion added a commit that referenced this pull request Apr 13, 2012

Merge pull request #3 from agoragames/bnet-status
Ability to check if Battle.net is online for a region

@cadwallion cadwallion merged commit 703690e into master Apr 13, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment