Skip to content

Commit 2ead5e8

Browse files
committed
Updates README for StatusScraper
1 parent 703690e commit 2ead5e8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,22 @@ scraper.scrape
125125
}
126126
```
127127

128+
## BnetScraper::Starcraft2::Status
129+
130+
Scraping is only possible if the site is up. Use this if you want to verify the failed scrape is because the site is down:
131+
132+
``` ruby
133+
BnetScraper::Starcraft2::Status.na # => 'Online'
134+
BnetScraper::Starcraft2::Status.fea # => 'Offline'
135+
BnetScraper::Starcraft2::Status.cn # => nil (China is unsupported)
136+
BnetScraper::Starcraft2::Status.fetch # => [
137+
{:region=>"North America", :status=>"Online"},
138+
{:region=>"Europe", :status=>"Online"},
139+
{:region=>"Korea", :status=>"Online"},
140+
{:region=>"South-East Asia", :status=>"Online"}
141+
]
142+
```
143+
128144
# Contribute!
129145

130146
I would love to see contributions! Please send a pull request with a feature branch containing specs

0 commit comments

Comments
 (0)