0.0
No release in over 3 years
Low commit activity in last 3 years
Ruby interface for the OpenProject API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.17
~> 0.13
~> 13.0
~> 3.0
 Project Readme

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.