README.md in access-1.0.1 vs README.md in access-1.0.2

- old
+ new

@@ -22,68 +22,107 @@ ###Config setup You can configure the following options: - - `access_token` Required - - `format` Set as "json" or "xml". Default is "json" - - `api_environment` Set as "staging" or "production". Default is "staging" - - `api_version` "v1" is default. - - `hashify` Returns the results all using Hashie::Mash if "true", Default is "false" + - `access_token` **Required** + - `format`: Set as `'json'` or `'xml'`. Default is `'json'` + - `api_environment`: Set as `'staging'` or `'production'`. Default is `'staging'` + - `api_version`: `'v1'` is default. + - `hashify` Returns the results all using Hashie::Mash if `'true'`, Default is `'false'` -You can set these buy creating environment variables called: +#### Config via Environment Variables +You can set config settings by creating environment variables called: + `ENV['ACCESS_TOKEN']`, `ENV['ACCESS_FORMAT']`, `ENV['ACCESS_ENVIRONMENT']`, `ENV['ACCESS_VERSION']`, `ENV['ACCESS_HASHIFY']` -or create an initializer file and set your config +#### Config via Initializer -``` +You can also create an initializer file to set up a config + +```ruby Access.configure do |config| config.access_token = ENV['ACCESS_TOKEN'] - config.hashify = "true" + config.hashify = 'true' end ``` You can also set them one at a time -`Access.config.format = 'xml` +`Access.config.format = 'xml'` ###Making Calls ####Offer - `Access::Offer.search options` - `Access::Offer.find offer_key options` *member_key required* +```ruby +Access::Offer.search options +``` +```ruby +Access::Offer.find **offer_key** options, member_key: **your-member-key** +``` + ####Store - `Access::Store.search options` - `Access::Store.find store_key options` +```ruby +Access::Store.search options +``` +```ruby +Access::Store.find store_key options +``` + ####Location - `Access::Location.search options` - `Access::Location.find location_key options` +```ruby +Access::Location.search options +``` +```ruby +Access::Location.find location_key options +``` + ####Category - `Access::Category.search options` - `Access::Category.find key options` +```ruby +Access::Category.search options +``` +```ruby +Access::Category.find key options +``` + ####Report - `Access::Report.usage options` - `Access::Report.usage token options` +```ruby +Access::Report.usage options +``` +```ruby +Access::Report.usage token options +``` + ####Token - `Access::Token.verify options` - `Access::Token.verify_other token options` +```ruby +Access::Token.verify options +``` +```ruby +Access::Token.verify_other token options +``` + ####Redeem - `Access::Redeem.redeem_offer key nil options` *member_key required* - `Access::Redeem.redeem_offer key redeem_type options` *member_key required* +```ruby +Access::Redeem.redeem_offer key nil options` *member_key required +``` + +```ruby +Access::Redeem.redeem_offer key redeem_type options` *member_key required +``` ####Member ## Contributing