Skip to content

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

License

Notifications You must be signed in to change notification settings

lulibrary/pure_iterator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages