API Overview

API Documentation

Music Getter provides a complete Node.js programming interface that you can use as a library in your projects.

Exported Modules

import { 
class Meting
Meting
,
const download: DownloadManager
download
} from 'music-getter';
import type { Music, MusicResponse, SearchOptions } from 'music-getter';

Core Modules

  • Meting API — Music resource acquisition client, supporting search, song/playlist/lyrics/cover retrieval, etc.
  • Download API — Download manager, supporting queued downloads and progress display

Type Definitions

Quick Example

import { 
class Meting
Meting
,
const download: DownloadManager
download
} from 'music-getter';
const
const meting: Meting
meting
= new
new Meting(server?: string): Meting
Meting
('netease');
const meting: Meting
meting
.
Meting.format(enable: boolean): Meting
format
(true);
// Search for songs const
const results: any
results
=
var JSON: JSON

An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.

JSON
.
JSON.parse(text: string, reviver?: (this: any, key: string, value: any) => any): any

Converts a JavaScript Object Notation (JSON) string into an object.

@paramtext A valid JSON string.@paramreviver A function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.@throws{SyntaxError} If text is not valid JSON.
parse
(await
const meting: Meting
meting
.
Meting.search(keyword: string, options?: SearchOptions): Promise<string>
search
('Daylight', {
SearchOptions.limit?: number | undefined
limit
: 5 }));
// Download the first one
const download: DownloadManager
download
.
DownloadManager.add(url: string | (() => Promise<string>), output: string): void
add
(
const results: any
results
[0].url_id, './Daylight.mp3');
await
const download: DownloadManager
download
.
DownloadManager.startAll(): Promise<void>
startAll
();

Meting API

Download API