README.md in ns-yapi-0.1.2 vs README.md in ns-yapi-0.2.0

- old
+ new

@@ -1,6 +1,6 @@ -Yet Another NS API [![Build Status](https://travis-ci.org/stefanhendriks/ns-api.png?branch=master)](https://travis-ci.org/stefanhendriks/ns-api) [![Coverage Status](https://coveralls.io/repos/stefanhendriks/ns-api/badge.png)](https://coveralls.io/r/stefanhendriks/ns-api) +Yet Another NS API [![Build Status](https://travis-ci.org/stefanhendriks/ns-api.png?branch=master)](https://travis-ci.org/stefanhendriks/ns-api) [![Coverage Status](https://coveralls.io/repos/stefanhendriks/ns-api/badge.png)](https://coveralls.io/r/stefanhendriks/ns-api) [![Dependency Status](https://gemnasium.com/stefanhendriks/ns-api.png)](https://gemnasium.com/stefanhendriks/ns-api) ================== A Ruby client for the NS API. Goal ==== @@ -52,5 +52,23 @@ station.name # 's-Hertogenbosch station.lat # 51.69048 station.long # 5.29362 ``` +Retrieve disruptions +==================== +```ruby +# get all known disruptions +disruptions = client.disruptions + +# get planned disruptions +planned = disruptions[:planned] + +# get unplanned disruptions +unplanned = disruptions[:unplanned] + +# get disruptions from specific station, ie Amsterdam (case insensitive) +disruptions = client.disruptions "Amsterdam" + +# will raise an NSClient::InvalidStationNameError error when station name is invalid +client.disruptions "bla" # NSClient::InvalidStationNameError: Could not find a station with name 'bla' +```