Skip to content
This repository was 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

This branch is 2 commits ahead of scpike/enigma:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4fe6973 · Jun 9, 2015

History

19 Commits
Jan 27, 2014
Jun 9, 2015
Sep 25, 2014
Jan 27, 2014
Aug 25, 2014
Jan 27, 2014
Jan 27, 2014
Jan 27, 2014
Sep 16, 2014
Jan 27, 2014
Apr 29, 2015

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%