Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

A Ruby API wrapper for IDFm/STIF Reflex/iCAR API

License

Notifications You must be signed in to change notification settings

enroute-mobi/stif-reflex-api

Repository files navigation

Reflex

Work in progress : An API wrapper for Stif Reflex API

Dependencies

Ruby >= 2.1.0 Libmagic

Install

Build

git clone git@github.com:af83/stif-reflex-api.git
cd stif-reflex-api
gem build Reflex.gemspec
gem install -l Reflex-0.0.1.gem

Add to your project

gem 'Reflex'
bundle install

Usage

client  = Reflex::API.new
results = client.process 'getOP'

You can set timeout and override api base url globally in your config/initializers/Reflex.rb

Reflex::API.base_url = "https://reflex.stif.info/ws/reflex/V1/service=getData"
Reflex::API.timeout  = 50

Tests

cd stif-reflex-api
rspec spec/Reflex