OpenprojectApi
This gem aims to provide at least a low level interface for the OpenProject API.
Installation
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
Usage
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
})
Development
After checking out the repo, run bin/setup
to install dependencies.
Then, run rake spec
to run the tests.
You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.