0.0
No commit activity in last 3 years
No release in over 3 years
A flexible way to process records in the Pure Research Information System.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 4.0
~> 1.6
 Project Readme

Pure Iterator

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

Status

Gem Version Maintainability

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.