Skip to content

sfelix-martins/redmine-client

Repository files navigation

Welcome to Node Redmine API Client 👋

Version License: MIT

A NodeJS API client to Redmine REST API

Prerequisites

  • node >=10

Install

yarn add @smartinsf/redmine-client

Usage

Create an instance of RedmineClient to access the resources. E.g.:

import { RedmineClient } from '@smartinsf/redmine-client';

// Create an instance passing your Redmine host and the username and password credentials
// Only Basic authentication is supported for now
const client = new RedmineClient('http://redmine.yourhost.com', {
  username: 'test',
  password: 'secret',
});

Resources

All resources accepts the params from Redmine docs in camelCase.

Issues

// Updating an issue
const issue = 123;
const params = {
  statusId: 1,
};
client.issues().update(issue, params);

Time Entries

// Listing time entries
const listParams = {
  offset: 1,
  limit: 100,
  projectId: 10,
  from: new Date(2020, 1, 1),
  to: new Date(2020, 1, 1),
  userId: 'me',
};
const timeEntries = client.timeEntries().list(listParams);

// Time entry creation
const params = {
  spentOn: new Date(2020, 2, 2),
  hours: 1,
  activityId: 2,
  comments: 'Testing redmine client',
  issueId: 10,
};
client.timeEntries().create(params);

Links

Redmine wiki page: http://www.redmine.org/projects/redmine/wiki/Rest_api

Author

👤 Samuel Martins

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published