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

jimce-deezer-api-ts

v0.0.2

Published

A TypeScript Deezer API client for Node.js

Readme

Jimce Deezer API Client

A TypeScript-based Deezer API Client for Node.js.

Installation

npm install jimce-deezer-api-ts

Usage

Basic Usage

import { JimceDeezerAPI } from 'jimce-deezer-api-ts';

const client = new JimceDeezerAPI();

// Search for a track
const results = await client.search('YOUR SEARCH');
const data = JSON.stringify(results, null, 2)
console.log(data);

API Methods

Search

const results = await client.search('YOUR SEARCH');

Tracks

const track = await client.getTrack(<TRACK_ID>);

Albums

const album = await client.getAlbum(<ALBUM_ID>);

Artists

const artist = await client.getArtist(<ARTIST_ID>);

Playlists

const playlist = await client.getPlaylist(<PLAYLIST_ID>);

Podcasts

const podcast = await client.getPodcast(<PODCAST_ID>);

Episodes

const episode = await client.getEpisode(<EPISODE_ID>);

Radio

const radio = await client.getRadio(<RADIO_ID>);

Charts (Top Charts)

const chart = await client.getChart();

Genres

const genres = await client.getGenres();

Editorial

const editorial = await client.getEditorial();

API Information

const infos = await client.getInfos();
const options = await client.getOptions();

Types

The package comes with full TypeScript support:

import { Track, Album, Artist, SearchResult } from 'jimce-deezer-api-ts';

const results: SearchResult = await client.search('Query');
const track: Track = results.data[0];

Development

Build

npm run build

Development Watch Mode

npm run dev

Testing

The package includes two different test suites:

1. Integration Tests (Mocked)

Standard unit tests with mocked API responses:

npm test

These tests:

  • ✅ Mock the fetch requests
  • ✅ Test parameter encoding
  • ✅ Test error handling
  • ✅ Completely isolated from the real API

2. Functional Tests (Real API)

End-to-end tests against the real Deezer API:

npm run test:functional

These tests validate:

  • ✅ All 13 API endpoints work
  • ✅ Response structures are correct
  • ✅ Data types are correct
  • ✅ Concurrent requests work

All Tests

npm run test:all

Test Watch Mode

npm run test:watch

GitHub Actions (Automated Tests)

The CI pipeline is defined in .github/workflows/tests.yml.

  • Integration Tests (mocked) run automatically on:
    • Pull requests
    • Push to main and master
  • Functional Tests (real Deezer API, not mocked) run automatically on:
    • Push to main and master
    • Schedule (Monday and Thursday at 02:00 UTC)
    • Manual trigger via workflow_dispatch

This keeps PR feedback fast while real API tests run automatically on a regular schedule.

Test Structure

tests/
├── integration/
│   └── deezer-client.integration.test.ts  (Mocked Tests)
├── functional/
│   └── deezer-api.functional.test.ts      (Real API Tests)
└── setup.ts

License

MIT License