@s4p/kugou-lrc
v0.2.0
Published
kugou lrc search, download, parse
Downloads
3
Readme
kugou-lrc
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);