message: Add a Getting Started section to the README
diff: @@ -10,6 +10,7 @@ Rust API bindings for the Stripe v1 HTTP API.
  This is compatible with all currently supported versions of Stripe's client-side
  libraries including https://js.stripe.com/v2/ and https://js.stripe.com/v3/.
  +
  ## Usage
  Put this in your `Cargo.toml`:
  @@ -23,3 +24,44 @@ And this in your crate root:
  ```rust
  extern crate stripe;
  ```
  +
  +To see how the library is used, look through the [examples](examples) folder.
  +
  +## Getting Started
  +
  +To get started, we need to create a client:
  +
  +```rust
  + let client = stripe::Client("sk_test_YOUR_STRIPE_SECRET");
  +```
  +
  +Then we can begin making requests as we'd like. Most Stripe requests accept
  +many optional parameters, so we usually get the `::default()` params and then
  +set the ones we want from there.
  +
  +Most requests for creating or updating a Stripe object use the same Rust struct,
  +so you may frequently need to refer to the [official API docs](https://stripe.com/docs/api)
  +to determine which fields are required for either request.
  +
  +```rust
  + /* Creating a Stripe Charge */
  +
  + let token = "TOKEN_FROM_CHECKOUT";
  + let mut params = stripe::ChargeParams::default();
  + // NOTE: Stripe represents currency in the lowest denominations (e.g. cents)
  + params.amount = Some(1095); // e.g. $10.95
  + params.source = Some(stripe::CustomerSource::Token(token));
  +
  + // Example: Override currency to be in Canadian Dollars
  + params.currency = Some(stripe::Currency::CAD);
  + let charge = stripe::Charge::create(&client, params).unwrap();
  + println!("{:?}", charge); // => Charge { id: "ch_12345", amount: 1095, .. }
  +```
  +
  +```rust
  + /* Listing Stripe Charges */
  +
  + let params = stripe::ChargeListParams::default();
  + let charges = stripe::Charge::list(&client, params).unwrap();
  + println!("{}", charges.data.len()); // => 1
  +```
  