README.md in chartmogul-ruby-0.1.1 vs README.md in chartmogul-ruby-0.1.2

- old
+ new

@@ -4,21 +4,24 @@ <h3 align="center">ChartMogul API Ruby Client</h3> <p align="center"><code>chartmogul-ruby</code> provides convenient Ruby bindings for <a href="https://dev.chartmogul.com">ChartMogul's API</a>.</p> -<p align="center"><img src="https://travis-ci.com/chartmogul/chartmogul-ruby.svg?token=3psqw6c8KMDqfdGQ2x6d&branch=master"></p> +<p align="center"> + <a href="https://badge.fury.io/rb/chartmogul-ruby"><img src="https://badge.fury.io/rb/chartmogul-ruby.svg" alt="Gem Version"></a> + <a href="https://travis-ci.org/chartmogul/chartmogul-ruby"><img src="https://travis-ci.org/chartmogul/chartmogul-ruby.svg?branch=master" alt="Travis project"></a> +</p> <hr> <p align="center"> <b><a href="#installation">Installation</a></b> | -<b><a href="#usage">Usage</a></b> -| <b><a href="#configuration">Configuration</a></b> | +<b><a href="#usage">Usage</a></b> +| <b><a href="#development">Development</a></b> | <b><a href="#contributing">Contributing</a></b> | <b><a href="#license">License</a></b> @@ -42,21 +45,42 @@ Or install it yourself as: $ gem install chartmogul-ruby -## Usage - -See ChartMogul's [API documentation](https://dev.chartmogul.com). - ## Configuration Configure `chartmogul-ruby` with your Account Token and Secret Key, available from the administration section of your ChartMogul account. ```ruby ChartMogul.account_token = '<Account key goes here>' ChartMogul.secret_key = '<Secret key goes here>' ``` + +## Usage + +For example, to create a Data Source object, + +Request: +```ruby +ChartMogul::Import::DataSource.create!( + name: 'In-house billing' +) +``` + +Response: +```ruby +#<ChartMogul::Import::DataSource:0x007ff9f127d628 +@name="In-house billing", +@uuid="ds_cfc2b8f2-ad2c-4e3d-b64f-58d0bb282824", +@status="never_imported", +@created_at=2016-06-27 11:27:37 UTC +> +``` + +You can find examples for each endpoint in the ChartMogul [API documentation](https://dev.chartmogul.com/). + +[![https://gyazo.com/f7a2a1b86a409586ee8dd0f4f7563937](https://i.gyazo.com/f7a2a1b86a409586ee8dd0f4f7563937.gif)](https://i.gyazo.com/f7a2a1b86a409586ee8dd0f4f7563937.gif) ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.