This gem aims to provide at least a low level interface for the OpenProject API.
Add this line to your application’s Gemfile:
gem 'openproject_api'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install openproject_api
Create a client by passing it an endpoint and an apikey.
client = OpenprojectApi::Client.new(endpoint: 'https://your.openproject.instance.example.com', apikey: 'your-api-key')
# Request all workpackages.
client.work_packages
# Request all workpackages created between 2019-10-14 and 2020-10-14.
client.work_packages(query: {
filters: [
{
createdAt: {
operator: '<>d',
values: [
'2019-10-14T00:00:00Z',
'2020-10-14T00:00:00Z',
],
},
},
].to_json
})