###Description Connection Wrapper is a simple API wrapper written for a hypothetical API. It can easily be modified and used to work with any existing get only API.
###Initial Dependancies. Library is written in ruby 2.2.2. You must also have bundler installed previously to run the code. Other dependencies are handled by bundler.
###Running The App
- Clone the repo
- Change directory to local repo
- Bundle install to get all gems (all dependencies listed in the gemfile)
- Run 'rake' from the root directory to run the test suite.
###Using the Library
####Making a request.
- Create an instance of Connection::Customer_rating by calling.
con = Connection::Customer_rating.new(40000, 60626, 25)
This will create a new customer rating object that is initialized with an income of 40000, zip of 60626 and age of 25. 2. You can then make the get request by calling
con.information
####Interacting With The objects.
- You can call any method present in the information hash directly on the customer_rating object. That means that in the previous example calling
con.propensity
will give you the propensity of that consumer_rating.
- If a method called on object does not exist in the hash it will return a standard NoMethodError.