Gatekeeper API Client

Common logic for consuming the GateKeeper API.

Installation

Add this line to your application's Gemfile: ```gem "gatekeeper_api_client", "1.1.0"


## Usage
The application using this gem must have defined the following environment variables:
 - `GATEKEEPER_API_KEY`: The authentication key.
 - `GATEKEEPER_URL`: The URL to post data.

### Transit
To post a `transit`, build an object with a record and send the `post` message to it.

Transit.new(record).post


The record must respond to:
- `authorized` returns a string.
- `badge_number` returns a string.
- `sensor_code` returns a string.
- `time` returns a Time (with Timezone) object.
- `valid?` returns a boolean,

### Employee
To post an `employee`, build an object with a record and send the `post` message to it.

Employee.new(record).post


The record must respond to:
- `employee_name` returns a string.
- `badge_number` returns a string.
- `department_name` returns a string.
- `valid?` returns a boolean.