Project

R3c

0.0
No commit activity in last 3 years
No release in over 3 years
Redmine Rest Client written in Ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 4.1.0, ~> 4.1
>= 1.8.3, ~> 1.8.3
>= 2.0.0, ~> 2.0.0
 Project Readme

R3c

[R3c.gem] (https://rubygems.org/gems/R3c)

Rest Redmine Ruby Client

Main Features:

  • Most of the API is covered
  • Basic Auth and Key-based authentication are supported
  • Check code for more usage examples

Setup

gem install R3c

Usage

Configure Redmine URL

R3c.site('http://localhost:3000/')

Set format

R3c.format(:xml)

Configure Authentication

Key-based:

R3c.auth({api: {key: '8091d55257c4c90b6d56e83322622cb5f4ecee64'}})

Or Basic Auth (user/password):

R3c.auth({basic_auth: {user: 'admin', password: 'password'}})

###Prepare to create an issue with an attachment

file = File.read('c:\windows-version.txt')
token = R3c.upload file
issue_params= {"project_id"=> 1, "subject"=> "This is the subject"}
issue_params["uploads"]= [{"upload"=>{"token"=> token, "filename"=> "R3c.gemspec", "description"=> "a gemspec", "content_type"=> "text/plain"}}]

###Create the new issue

issue= R3c.issue.create(issue_params )

Retrieve all projects

projects= R3c.project.all

Find user by id

user= R3c.user.find 1

See code for more examples