Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

jodacame/happi-dev-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

Status: unstable Don't use it in production yet

Happi.dev SDK

Simple, robust Happi.dev API client

Table of Contents

  1. Installation
  2. Modules
  3. Cache

Installation

npm install https://github.com/jodacame/happi-dev-sdk.git --save

Modules

Happi bring new value to your company by driving innovation in many ways. Since APIs are being utilized every day.

Music

It provides free api to discover millions song, artist, albums, covers and lyrics

Methods

Search

Search artist or tracks

search(query, limit, type[artist|tracks, default:track])

Artist

Get artist information

artist(id_artist)

Albums

Get albums from artist

albums(id_artist)

Tracks

Get tracks from album

tracks(id_artist, id_album)

SmartPlaylist

Generate smart playlist using artist seed

smartPlaylist(id_artist, limit)

smartPlaylistByBPM

Generate smart playlist using bpm range

smartPlaylistByBPM(bpm, limit,genres)
Examples
smartPlaylistByBPM(100, 50); // Get smart playlist tempo 100
smartPlaylistByBPM('80-100', 50, 'rock'); // Get smart playlist tempo between 80 and 100 with rock genre

AcrosticPlaylist

Generate a acrostic playlist using artist seed and first track letter

acrostic(id_artist, message[Max 100 Charactes])

Lyrics

Get track lyrics

lyrics(id_artist, id_album, id_track)

Genres

Get track genres

genres()

Usage

More info in https://happi.dev/

var happi = require("happi-dev-sdk");

happi.init('YOUR_API_KEY');

var query = 'Aerosmith Jade';

happi.music.search(query, 40).then(response => {
    console.log(response);
}).catch(err => {
    console.log("Error",err);
});

Cache

Ensable or disable cache

// Enable
happi.cache.on();
// Disable
happi.cache.off();

TODO

  • Redis cache
  • Documentation
  • API: Exchange Rate
  • API: IP Address
  • API: Key/Value store
  • API: Password Generator
  • API: QR Code

About

Simple, robust Happi.dev API client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published