Skip to content
A flexible way to process records in the Pure Research Information System
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.gitignore
CHANGELOG.md
Gemfile
LICENSE.txt
README.md
pure_iterator.gemspec

README.md

Pure Iterator

A flexible way to process records in the Pure Research Information System.

Installation

Add this line to your application's Gemfile:

gem 'pure_iterator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install pure_iterator

Usage

class Foo < PureIterator::Base
  def act(response)
    # do something
  end

  def post_endpoint
    'persons'
  end
end
def config
  {
    host: 'pure.example.com',
    username: 'YOUR_PURE_USERNAME',
    password: 'YOUR_PURE_PASSWORD',
    api_key:  'YOUR_PURE_API_KEY',
    api_version: 514
  }
end

iterator = Foo.new config
iterator.accept :json # default is :xml
params = {size: 20} # for pagination, use size and offset
iterator.iterate params

License

The gem is available as open source under the terms of the MIT License.

You can’t perform that action at this time.