README.md in lelylan-rb-0.0.4 vs README.md in lelylan-rb-0.0.5
- old
+ new
@@ -1,18 +1,17 @@
# Lelylan Ruby Gem
Ruby client library for [Lelylan API](http://dev.lelylan.com)
-## What is Lelylan
+## Introduction
-Lelylan makes it easy for developers to monitor and control all devices in
-your house providing a simple, self descriptive and consistent representation of them. Lelylan
-maps every device in your house to a unique URI which will provide a simple access over it.
+#### What is Lelylan
-With Lelylan developers can build secure applications and services that use real-time data
-coming from the real world to create the future connected house.
+[Lelylan](http://lelylan.com) makes it easy for developers to monitor and control all devices
+in your house providing a simple and consistent REST API.
+
## Requirements
Ruby client library is tested against MRI 1.9.3.
@@ -26,11 +25,11 @@
```
Development version.
```ruby
-gem 'lelylan-rb', require: 'lelylan', git: 'https://github.com/lelylan/lelylan-rb', branch: 'master'
+gem 'lelylan-rb', require: 'lelylan', git: 'https://github.com/lelylan/lelylan-rb'
```
## Getting started
### Require Gem
@@ -89,60 +88,26 @@
subscriptions = lelylan.subscriptions
```
### Implemented Services
-**Devices** - The Device API defines a set of services to monitor and control every existing
-device. Its final goal is to map every device to a unique URI which provides control over it.
-[See examples](http://dev.lelylan.com/api/devices#ruby).
+Learn how to use Lelylan and AngulasJS in deep.
-**Activations** - Easy way to move the device ownership between people.
-[See examples](http://dev.lelylan.com/api/devices#ruby).
+- [x] [Devices](http://dev.lelylan.com/api/devices#angular).
+- [x] [Activations](http://dev.lelylan.com/api/devices#angular).
+- [x] [Histories](http://dev.lelylan.com/api/devices/histories#angular).
+- [x] [Types](http://dev.lelylan.com/api/types#angular).
+- [x] [Properties](http://dev.lelylan.com/api/types/properties#angular).
+- [x] [Functions](http://dev.lelylan.com/api/types/functions#angular).
+- [x] [Statuses](http://dev.lelylan.com/api/types/statuses#angular).
+- [x] [Locations](http://dev.lelylan.com/api/locations#angular).
+- [x] [Physical devices](http://dev.lelylan.com/api/physicals#angular).
+- [x] [Subscriptions](http://dev.lelylan.com/api/realtime#angular).
+- [x] [User Profile](http://dev.lelylan.com/api/core#get-a-user-angular).
+- [x] [OAuth2](http://dev.lelylan.com/api/oauth#implicit-grant-angular).
-**Histories** - When a device updates its properties or executes a function a new history
-resource with a snapshot of all device properties is created by Lelylan, also the ones that
-has not been updated. This makes it easy to recreate previous device status and extract usage
-patterns to improve the way people live their house.
-[See examples](http://dev.lelylan.com/api/devices/histories#ruby).
-**Types** - A type describes the structure of a device. In its simplest form every type can be
-defined as the combination of three key elements: properties (what vary during time), functions
-(what a device can do), statuses (what a device is in a specific time of its life).
-[See examples](http://dev.lelylan.com/api/types#ruby).
-
-**Properties** - A property is whatever vary in a device during time. It can be the intensity in
-a dimmer, the temperature in a cooling system or the volume in a television.
-[See examples](http://dev.lelylan.com/api/types/properties#ruby).
-
-**Functions** - Functions defines the daily interactions you have with the devices in your house,
-for example when you turn on a light, close a door or raise the temperature in a room.
-With functions you can control any device in the same way you do everyday of your life.
-[See examples](http://dev.lelylan.com/api/types/functions#ruby).
-
-**Statuses** - Properties are not always enough to describe the status of a device. Think at a roller
-shutter for example. It has the property aperture that is 100 when open or 0 when closed.
-But what if the roller shutter is opening? It is nether open or close. To have a complete
-control over the device status in a specific moment of its life is to use the status API.
-[See examples](http://dev.lelylan.com/api/types/statuses#ruby).
-
-**Locations** - Locations are the places we live in and where physical devices are placed. Lelylan identifies
-three types of locations usually organized in a hierarchical structure: houses, floors and
-rooms.
-[See examples](http://dev.lelylan.com/api/locations#ruby).
-
-**Physical Devices** - Physical devices are the real objects you physically interact with everyday of your life
-like lights, appliances, alarms and more. To enable the communication between Lelylan and
-physical devices they should provide a simple set of web services.
-[See examples](http://dev.lelylan.com/api/physicals#ruby).
-
-**Subscriptions** - Get realtime updates by subscribing to a resource and its related event.
-[See examples](http://dev.lelylan.com/api/realtime#ruby).
-
-**User Profile** - Returns extended information for the authenticated user.
-[See examples](http://dev.lelylan.com/api/core#get-a-user-ruby).
-
-
### Authorization flows
#### Authorization code flows
```ruby
@@ -173,13 +138,16 @@
Exceptions are raised when a 4xx or 5xx status code is returned.
Lelylan::BadRequest # 400
Lelylan::Unauthorized # 401
+ Lelylan::Forbidden # 403
Lelylan::NotFound # 404
+ Lelylan::NotAcceptable # 406
Lelylan::NotValid # 422
Lelylan::InternalServerError # 500
+ Lelylan::NotImplemented # 501
Lelylan::BadGateway # 502
Lelylan::ServiceUnavailable # 503
Through the error message attribute you can access the error information.
@@ -193,11 +161,11 @@
```
Unluckily the `#message` method can only be a string. For this reason we
can't return a JSON structure when lelylan offers it, but we return the
`error.description` value.
-Learn more about the [error response structure](http://dev.lelylan.com/api/core#errors).
+Learn more about [errors on Lelylan](http://dev.lelylan.com/api/core#errors).
### Configurations
#### API endpoint
@@ -213,11 +181,9 @@
```ruby
lelylan = Lelylan::Client.new(token: token)
lelylan.endpoint = 'https://lelylan.yourhouse.com'
```
-
-Learn more about the [error response structure](http://dev.lelylan.com/api/core#errors).
## Contributing
Fork the repo on github and send a pull requests with topic branches. Do not forget to