@s4p/kugou-lrc
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

kugou-lrc

npm build coverage

how to use

npm install @s4p/kugou-lrc

see test folder to learn more

get

function get(params: { keyword: string; milliseconds: number; fmt: Format.krc }): Promise<KrcInfo>;
function get(params: { keyword: string; milliseconds: number; fmt: Format.lrc }): Promise<LrcInfo>;
function get(params: { hash: string; fmt: Format.krc }): Promise<KrcInfo>;
function get(params: { hash: string; fmt: Format.lrc }): Promise<LrcInfo>;
function get(params: { keyword: string; milliseconds: number }): Promise<KrcInfo>;
function get(params: { hash: string }): Promise<KrcInfo>;

const lrc = await get({
  keyword: '小さな恋のうた',
  milliseconds: 325000,
  fmt: Format.lrc,
});

search

function search(params: { keyword: string; milliseconds: number }): Promise<KugouLrc[]>;
function search(params: { hash: string }): Promise<KugouLrc[]>;

await search({ keyword: '小さな恋のうた', milliseconds: 325000 });

download

function download(option: LrcDownloadOption): Promise<string>;

await download({ id, accesskey, fmt: Format.krc });

parse

function parseKrc(content: string): KrcInfo;
function parseLrc(content: string): LrcInfo;

const krc = await parseKrc(krcStr);

Thanks

kugou-lyric 酷狗歌词 API

Readme

Keywords

Package Sidebar

Install

npm i @s4p/kugou-lrc

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

28.5 kB

Total Files

26

Last publish

Collaborators

  • demoshang
  • xinshangshangxin