Gatekeeper API Client
Common logic for consuming the GateKeeper API.
Installation
Add this line to your application's Gemfile:
source "https://rubygems.pkg.github.com/inforlife" do
gem "gatekeeper_api_client", "1.0.0"
end
Usage
The application using this gem must have defined the following environemnt variables:
GATEKEEPER_API_KEYGATEKEEPER_TIMEZONEGATEKEEPER_URL
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:
authorizedbadge_numberdatesensor_codetimevalid?
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_namebadge_numberdepartment_namevalid?