A basic Ruby client library for working with data published as part of the OpenActive project.
Specifically the code provides support for:
- Listing all datasets that have been published as part of the project
- Fetching and harvesting a Realtime Paged Data Exchange (RPDE) containing opportunity data
- Identifying whether a feed conforms to the RPDE specification and/or the Modelling Opportunity Data specification
The project also provides some simple command-line tools to help to illustrate its use.
Add this line to your application's Gemfile:
gem 'openactive'
And then execute:
$ bundle
Or install it yourself as:
$ gem install openactive
The code includes a couple of example scripts in the bin
directory that illustrate usage of the library to fetch
metadata and page through feeds.
See:
bin/oa_list.rb
-- list all published datasetsbin/oa_status.rb
-- create a CSV file summarising current status of published datasetsbin/oa_sample.rb
-- dump a random "modified" entry from a feedbin/oa_harvest.rb
-- harvest all data from a feed, storing results in a directory
For a slightly longer example, take a look at this tutorial on Indexing Opportunity Data Using Elastic Search
The library doesn't currently provide support for manipulating individual items in an RPDE feed. It just returns the individual items as Ruby hashes that can then be manipulated by the calling code.