hybridgroup/cylon — pull request #195 by stewart (2014-06-06 21:23:34+00:00)
Title: Refactor Robots collection

This PR actually makes a few changes:

- Cylon.robots is now a dict/hash/object, rather than an array. Robots are stored in this dict, under their name.
- the `find{Robot,RobotDevice,RobotConnection}` methods are gone, since they were only really used in the API
- appropriate API requests now get a new middleware added that automatically loads up the appropriate robot/device/connection object, and returns an appropriate error if the requested object is unavailable
- the Robot/Device/Connection `#data` methods have been renamed to `#toJSON`, as this is more accurate and works with the implicit conversion `JSON.stringify` offers
- updates the SalesForce examples that used findRobot to look it up manually instead.