The capital_one gem interfaces Ruby developers with Capital One's Hackathon API. Simply require 'capital_one' and gain access to the API methods. Documentation for Capital One's API can be found at http://reimaginebanking.com/documentation.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install capital_one
Require the gem
Go to http://reimaginebanking.com and sign up for an API Key with your Github account. Read the documentation on the API and go to your Profile page and retrieve your API key. Once you retrive your key you must specify the key in your project to gain access to the API.
Config.apiKey = "YOUR_API_KEY"
You will see that you are assigned two api keys when signing up for the API. These keys have different roles and permissions assigned to them.
Enterprise Key - Take on the role of a Capital One employee. Only GET requests are permitted.
Customer Key - Take on the role of a Capital One customer. All requests involving your assigned customers and anything they own are permitted.
- No methods for Enterprise endpoints. If you wish to use Enterprise, you will have to write your own get requests. Net::HTTP is the easiest way to do this.
- Responses that are paginated, such as getting all ATMs or all Branches, isn't intuitive to use with wrapper methods. Again, this can be accomplished through writing explicit requests to the endpoint supplied in the response.
- Transactions can take up to 60 seconds to occur. This isn't a bug with the wrapper; the API is designed to execute transactions every minute to simulate the delayed transaction time experienced with real transactions.
- ATMs are populated for Arlington, VA and surrounding locations, not the whole country
After checking out the repo, run
bin/setup to install dependencies. Then, run
bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run
bundle exec rake install. To release a new version, update the version number in
version.rb, and then run
bundle exec rake release to create a git tag for the version, push git commits and tags, and push the
.gem file to rubygems.org.
- Fork it ( https://github.com/[my-github-username]/capital_one/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request