Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@huanlin/163music-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@huanlin/163music-api

NeteaseMusicApi's TypeScript Version

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

TypeCloudMusic

NeteaseMusicApi's TypeScript Version

这儿 fork 的 原作者好像并没有 pub 到 npm,不方便开发使用

Install

Install TypeScript in global is recommended.

[sudo] npm -g install typescript

Clone it in your project.

git clone https://github.com/pboymt/TypeCloudMusic.git
npm install

Compile to JavaScript.

tsc

Usage

Import in TypeScript.

import { search, album, artistAlbums, comments } from './lib/main';

Import in JavaScript.

const { search, album, artistAlbums, comments } = require('./dist/main');

Use Search API

e.g. id is 1234

// Callback
search('周杰伦', (data) => {
    console.log(data);
});

// Promise
search('周杰伦')
    .then((data) => {
        console.log(data);
    })
    .catch((err) => {
        console.log(err);
    });

Use Album API

e.g. id is 34944913

// Callback
album(34944913, (data) => {
    console.log(data);
});

// Promise
album(34944913)
    .then((data) => {
        console.log(data);
    })
    .catch((err) => {
        console.log(err);
    });

Use ArtistAlbums API

e.g. id is 6452

// Callback
artistAlbums(6452, (data) => {
    console.log(data);
});

// Promise
artistAlbums(6452)
    .then((data) => {
        console.log(data);
    })
    .catch((err) => {
        console.log(err);
    });

Use Comments API

e.g. id is 1234

// Callback
comments(30394891, (data) => {
    console.log(data);
});

// Promise
comments(30394891)
    .then((data) => {
        console.log(data);
    })
    .catch((err) => {
        console.log(err);
    });

Keywords

FAQs

Package last updated on 21 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc