@smartinsf/redmine-client
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @smartinsf/redmine-client

Weekly Downloads

0

Version

0.5.0

License

MIT

Unpacked Size

59.3 kB

Total Files

54

Last publish

Collaborators

  • sam.martins