Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuanxu/ojra
A Ruby wrapper for the Open Journal's Reviewers application's API
https://github.com/xuanxu/ojra
Last synced: 6 days ago
JSON representation
A Ruby wrapper for the Open Journal's Reviewers application's API
- Host: GitHub
- URL: https://github.com/xuanxu/ojra
- Owner: xuanxu
- License: mit
- Created: 2023-01-16T09:51:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-25T09:57:54.000Z (6 months ago)
- Last Synced: 2024-12-13T02:42:28.492Z (10 days ago)
- Language: Ruby
- Size: 37.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OJRA: Open Journals Reviewers API
A Ruby wrapper for the Open Journal's [Reviewers application](https://github.com/openjournals/reviewers)'s API
[![Tests](https://github.com/xuanxu/ojra/actions/workflows/tests.yml/badge.svg)](https://github.com/xuanxu/ojra/actions/workflows/tests.yml)
[![Gem Version](https://badge.fury.io/rb/ojra.svg)](https://badge.fury.io/rb/ojra)## Use
### Installation
Install OJRA running:
```
gem install ojra
```Or adding the gem to your project's `Gemfile`:
```ruby
gem "ojra"
```### Authentication
Initialize the API Client class with the URL of the Reviewers site and a valid API token:
```ruby
require "ojra"client = OJRA::Client("https://reviewers-app.url", "secretTOKEN1234")
```### Available methods
**STATS:**
- **assign_reviewers(reviewers_list, issue_id)**: Add a new active review to a reviewer or list of reviewers (array or comma separated string)
```ruby
client.assign_reviewers("@reviewer21", 4321)
client.assign_reviewers("@reviewer21, @reviewer33, @reviewer42", 4321)
client.assign_reviewers(["reviewer21", "reviewer33", "reviewer42"], 4321)
```- **unassign_reviewers(reviewers_list, issue_id)**: Log a review unassignment for a reviewer or list of reviewers (array or comma separated string)
```ruby
client.unassign_reviewers("@reviewer21, @reviewer33, @reviewer42", 4321)
client.unassign_reviewers("@reviewer21", 4321)
client.unassign_reviewers(["reviewer21", "reviewer33", "reviewer42"], 4321)
```- **start_review(reviewers_list, issue_id)**: Log starting a review for a reviewer or list of reviewers (array or comma separated string)
```ruby
client.start_review("@reviewer21", 4321)
client.start_review("@reviewer21, @reviewer33, @reviewer42", 4321)
client.start_review(["reviewer21", "reviewer33", "reviewer42"], 4321)
```- **finish_review(reviewers_list, issue_id)**: Log end of review for a reviewer or list of reviewers (array or comma separated string)
```ruby
client.finish_review("@reviewer21", 4321)
client.finish_review("@reviewer21, @reviewer33, @reviewer42", 4321)
client.finish_review(["reviewer21", "reviewer33", "reviewer42"], 4321)
```