Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Commit

Permalink
Update readme with usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
shayfrendt committed Feb 15, 2012
1 parent e435a2c commit 50b3cd3
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,7 +4,30 @@ StatRaptor API wrapper for Ruby [![build status](https://secure.travis-ci.org/ch
Interact with client like so: Interact with client like so:


``` ruby ``` ruby
TODO # Configure the library to use your
# StatRaptor platform credentials

StatRaptor.configure do |config|
config.platform_credentials = "ABC123"
end

# Initialize a client
client = StatRaptor::Client.new

# Manage users
client.create_user(:email => "timmy@example.com", :chargify_api_key => "XYZ456")
client.delete_user("akskd8328389281728918")

# Manage projects
client.create_project(:user_credentials => "3892839akslje",
:project => {:name => "Zippy", :subdomain => "zippy-llc", :component => "advanced"})
client.delete_project(:user_credentials => "3892839akslje", :subdomain => "zippy-llc")

# Graphs
client.get_revenue_graph_data(:user_credentials => "3892839akslje", :subdomain => "zippy-llc")
client.get_subscribers_graph_data(:user_credentials => "3892839akslje", :subdomain => "zippy-llc")
client.get_average_lifetime_value_graph_data(:user_credentials => "3892839akslje", :subdomain => "zippy-llc")
client.get_churn_graph_data(:user_credentials => "3892839akslje", :subdomain => "zippy-llc")
``` ```


### Installation ### Installation
Expand Down

0 comments on commit 50b3cd3

Please sign in to comment.