Project

enigma_io

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby client for the Enigma API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

>= 0
>= 1.0.0
 Project Readme

Ruby client for the enigma api

Ruby client for the enigma api located at https://app.enigma.io/api. Supports ruby >= 1.9.3

Note that you need an api key to use their api.

Build Status

Installation

Add this line to your application's Gemfile:

gem 'enigma_io'

And then execute:

$ bundle

Or install it yourself as:

$ gem install enigma_io

Usage

Basic usage is straightforward. There are also more detailed data api examples and export api examples available.

# Defaults to looking for key in ENV['ENIGMA_KEY']

client = Enigma::Client.new(key: :secret_key)

client.meta('us.gov.whitehouse.visitor-list')

res = client.data('us.gov.whitehouse.visitor-list')

# get some data

res.result.map { |r| ... }

client.stats('us.gov.whitehouse.visitor-list', select: 'type_of_access')

client.export('us.gov.whitehouse.visitor-list').parse.each do |row|
   puts row.inspect
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Notes

You'll need to have rubocop installed.

gem install rubocop

Tests are run with rake. Check the test coverage (printed when you run rake) as well as the output of rubocop (also run with rake).

License

MIT license