README.md in apple_system_status-0.1.1 vs README.md in apple_system_status-0.2.0
- old
+ new
@@ -29,14 +29,12 @@
$ gem install apple_system_status
## Usage (via. ruby)
```ruby
-crawler = AppleSystemStatus::Crawler.new
-
# English
-pp crawler.perform
+pp AppleSystemStatus::Crawler.perform
{:title=>"System Status as of 12:51 AM JST",
:services=>
[{:title=>"App Store",
:description=>"No Issues: App Store",
@@ -46,11 +44,11 @@
:status=>"allgood"},
# ...
]}
# Japanese
-pp crawler.perform("jp")
+pp AppleSystemStatus::Crawler.perform(country: "jp")
{:title=>"00:53 JST 時点のシステム状況",
:services=>
[{:title=>"App Store", :description=>"問題なし: App Store", :status=>"allgood"},
{:title=>"iCloud ストレージアップグレード",
@@ -74,14 +72,29 @@
$ apple_system_status help fetch
Usage:
apple_system_status fetch
Options:
- [--country=COUNTRY] # country code. (ex. jp, ca, fr)
+ [--country=COUNTRY] # country code. (e.g. jp, ca, fr)
# Default: us
[--title=TITLE] # If specified, narrow the service title
- [--format=FORMAT] # output format. (ex. plain, json)
+ [--format=FORMAT] # output format. (e.g. plain, json)
# Default: plain
+```
+
+### Example
+```sh
+$ apple_system_status fetch --country=us --title="iTunes Store" --format=json | jq .
+{
+ "title": "System Status as of 4:33 PM JST",
+ "services": [
+ {
+ "title": "iTunes Store",
+ "description": "No Issues: iTunes Store",
+ "status": "allgood"
+ }
+ ]
+}
```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. Run `bundle exec apple_system_status` to use the gem in this directory, ignoring other installed copies of this gem.