README.md in cloud_connect-2.0.2 vs README.md in cloud_connect-3.0.3
- old
+ new
@@ -1,97 +1,42 @@
-The Coud Connect Ruby Gem
-==========================
+# CloudConnect
+Simple Ruby wrapper for the CloudConnect v3 API.
-A Ruby wrapper for the [Cloud Connect API](http://develop.g8teway.com).
+## Installation
-Installation
-------------
- gem install cloud_connect
+```bash
+gem install cloud_connect
+```
-Usage
------
+## Documentation
- require 'rubygems'
- require 'cloud_connect'
+http://rdoc.info/gems/cloud_connect
-### Instantiate a client
+## Authenticated Requests
- cloud_connect = CloudConnect::Client.new(:username => 'user', :password => 'password', :account => 'test', :env => 'sandbox')
+### Setup a client with your token
-### Or configure once
+```ruby
+cc = CloudConnect::Client.new(:account => "demo", :token => "token")
+cc.asset("imei")
+```
- CloudConnect.configure do |config|
- config.username = 'user'
- config.password = 'password'
- config.account = 'test'
- config.env = 'sandbox'
- end
- cloud_connect = CloudConnect.client.new
+## Examples
-### Login
+### Show an asset
- cloud_connect.login
+```ruby
+cc.asset("imei")
+=> #<Hashie::Mash imei="imei" name=nil serial=nil url="http://url.cloudconnect.io/api/v3/assets/imei">
+```
-### Examples
+### Show last messages for an asset
- cloud_connect.units
- => [<#Hashie::Mash id=2 lat=nil lng=nil time=nil>, <#Hashie::Mash id=3 lat=4884481 lng=226392 time="2009-07-08T10:23:13Z">]
+```ruby
+cc.messages(asset:"imei")
+```
-Details for the current user
- cloud_connect.user
+### Channels
-Details for another user
-
- cloud_connect.user('other_user')
- cloud_connect.user(1)
-
-Send a message to a unit
-
- cloud_connect.send_message(1, 11, "Hello World!")
-
-Get a unit's last known position
-
- unit = cloud_connect.unit(3)
- puts "#{unit.location.join(', ')} @ #{unit.time}"
-
-We recommand you install the [yajl-ruby](http://github.com/brianmario/yajl-ruby) Gem
-for improved performance over the default pure ruby JSON library.
-
-Contributing
-------------
-In the spirit of [free software](http://www.fsf.org/licensing/essays/free-sw.html), **everyone** is encouraged to help improve this project.
-
-Here are some ways *you* can contribute:
-
-* by using alpha, beta, and prerelease versions
-* by reporting bugs
-* by suggesting new features
-* by writing or editing documentation
-* by writing specifications
-* by writing code (**no patch is too small**: fix typos, add comments, clean up inconsistent whitespace)
-* by refactoring code
-* by closing [issues](http://github.com/mobile-devices/cloud_connect/issues)
-* by reviewing patches
-
-All contributors will be added to the [HISTORY](https://github.com/mobile-devices/cloud_connect/blob/master/HISTORY.md)
-file and will receive the respect and gratitude of the community.
-
-Submitting an Issue
--------------------
-We use the [GitHub issue tracker](http://github.com/mobile-devices/cloud_connect/issues) to track bugs and
-features. Before submitting a bug report or feature request, check to make sure it hasn't already
-been submitted. You can indicate support for an existing issuse by voting it up. When submitting a
-bug report, please include a [Gist](http://gist.github.com/) that includes a stack trace and any
-details that may be necessary to reproduce the bug, including your gem version, Ruby version, and
-operating system. Ideally, a bug report should include a pull request with failing specs.
-
-Submitting a Pull Request
--------------------------
-1. Fork the project.
-2. Create a topic branch.
-3. Implement your feature or bug fix.
-4. Add documentation for your feature or bug fix.
-5. Run <tt>bundle exec rake doc:yard</tt>. If your changes are not 100% documented, go back to step 4.
-6. Add specs for your feature or bug fix.
-7. Run <tt>bundle exec rake spec</tt>. If your changes are not 100% covered, go back to step 6.
-8. Commit and push your changes.
-9. Submit a pull request. Please do not include changes to the gemspec, version, or history file. (If you want to create your own version for some reason, please do so in a separate commit.)
+```
+cc.channels
+```