Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.
/ enigma Public archive
forked from scpike/enigma

Ruby client for the enigma api at engima.io

License

Notifications You must be signed in to change notification settings

loveland/enigma

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Ruby client for the enigma api at engima.io

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%