npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@adiacentlib/tempoclient4

v1.0.10

Published

Tempo rest api client v4

Readme

JavaScript Tempo API Client for node.js

Tempo Rest API

An unofficial node.js wrapper for the Tempo REST API V4.

The repo aims to be similar in usage to the tempo-client.

Installation

Install using NPM:

$ npm install @adiacentlib/tempoclient4

Examples

Instantiating the client

The bearerToken can be retrieved in two ways; Either as an individual user (useful for running personal reports and basic tests), or as an application developer (Useful for developing apps that seamlessly integrate with Tempo). Please see the sections "Using the REST API as an individual user" or "Using the REST API as an application developer" in Tempo's documentation.

Note that the bearer token for Tempo IS NOT the same as the token generated in Jira.

// ES5
const TempoApi = require('@adiacentlib/tempoclient4');

// ES6
import TempoApi from '@adiacentlib/tempoclient4';

const tempo = new TempoApi({
  bearerToken: 'XXXXXXX',
})

Getting worklogs for a JIRA user

const user = {
  accountId: '1111aaaa2222bbbb3333cccc'
};
const dateRange = {
  from: '2019-10-07',
  to: '2019-10-11'
};

// ES6
const worklogs = tempo.worklogs.getWorklogsByUser(user.accountId, dateRange.from, dateRange.to)
  .then(worklogs => {
    console.log(worklogs.results);
  })
  .catch(err => {
    console.log(err);
  });

// ES7
async function getWorklogsForUser(user, from, to) {
  try {
    const worklogs = (await tempo.worklogs.getWorklogsByUser(user.accountId, from, to )).body;
    console.log(worklogs.results);
  } catch (err) {
    console.log(err);
  }
}

Create, modify, delete an "Account"

// Create a new account using `.post(...)`
let account = {
  key: 'CLOUDBAY_DEVELOPMENT',
  name: 'Cloudbay: Development',
  status: 'OPEN',
  leadAccountId: "123456:01234567-89ab-cdef-0123-456789abcdef"
};

let accountId = (await tempo.accounts.createAccount(account)).body.id;
console.log(`Account "${account.key}" has an id of: ${accountId}`);

// Modify the account using `.putAccount(...)`
account.status = 'CLOSED'
const accountOnTempo = (await tempo.accounts.updateAccount(account.key, account)).body;
console.log(`Account "${account.key}" is now: ${accountOnTempo.status}`);

// Delete the account using `.deleteAccount(...)`
await tempo.accounts.deleteAccount(account.key);

// `.getAccount(...)` will throw an error now that the account is deleted
try {
  await tempo.accounts.getAccountById(accountId);
} catch (err) {
  console.log(`Account "${account.key}" no longer exists!`);
}

Documentation

REST API

All endpoints listed in the Tempo REST API (https://apidocs.tempo.io/) for the Version 4 REST API are implemented as of January 2025. The REST API documentation will answer most questions about the expected structure of data.

The Tempo Client itself

It's strongly recommended to use TypeScript as code typing will help quite a bit in navigating the client and object structure.