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 🙏

© 2024 – Pkg Stats / Ryan Hefner

saavnapi

v1.0.1

Published

A lightweight Node.js library providing access to JioSaavn's internal API, enabling song search, playlists, albums, and more. Ideal for building music-related applications.

Downloads

107

Readme

Motivation

The JioSaavn API, while powerful, presents several challenges for developers due to its complex and undocumented structure, which makes efficient integration difficult. Additionally, the API lacks necessary type consistency, leading to potential errors and a frustrating experience when using it with TypeScript.

SaavnAPI is designed to simplify and streamline the process of interacting with JioSaavn's API by providing a strongly-typed, developer-friendly interface. Built with TypeScript, it ensures reliable type safety, giving developers confidence in their code, along with enhanced tooling support, such as autocompletion and error checking.

To further enhance security and data integrity, SaavnAPI incorporates Zod for schema validation, which ensures that API responses are validated before use, adding an extra layer of reliability.

With SaavnAPI, developers can focus on building music-based applications without the complexity of managing the JioSaavn API directly, providing an efficient, secure, and enjoyable development experience.

Features

  • Simplified API Access: Provides an intuitive and streamlined interface for accessing JioSaavn’s API, making it easy to search for songs, playlists, albums, and more.

  • TypeScript Support: Fully written in TypeScript, delivering strong type safety, improved autocompletion, and enhanced error-checking to ensure reliable code.

  • Zod Validation: Integrates with Zod for schema validation, ensuring that all API responses meet expected formats and structures, adding a layer of data security and consistency.

  • Modular and Extensible: Designed with modularity in mind, allowing developers to use only the parts of the API they need, with the flexibility to extend functionality as needed.

  • Error Handling: Includes robust error-handling mechanisms to help manage and debug potential issues more effectively when interacting with the API.

  • Built for Modern JavaScript Environments: Compatible with the latest Node.js versions and ES modules, making it ideal for modern JavaScript and TypeScript environments.

  • Secure Data Handling: Uses Zod to validate and sanitize API data, reducing the risk of handling malformed or unexpected data.

With these features, SaavnAPI aims to provide a secure, efficient, and developer-friendly experience for working with JioSaavn's services.

Installation

To install SaavnAPI, you can use either npm or yarn to add it to your project.

Using npm

npm install saavnapi

Using yarn

yarn add saavnapi

Common Usage

Search for a Song:

import SaavnAPI from "saavnapi";

const songs = await SaavnAPI.search.searchSongs({
  query: "See you again",
  page: 0,
  limit: 10,
});

console.log(songs);

Acknowledgement and Credit

Special thanks to Sumit Kolhe for providing a valuable reference point to start the development of this library.