1.1.0 • Published 1 year ago

csn.js v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

CSN.JS

A library that wraps all of Chiasenhac's API.

Installation

npm i csn.js
or
yarn add csn.js

For further documentation, please visit docs page.

Example

For more examples, visit here

CommonJS (no account):

(async() => {
    const csnjs = require("csn.js");

    const client = new csnjs.Client();

    const song = await client.search.song("Shape of you");
    const links = await song[0].getAudioUrl();

    console.log(links);
})();

CommonJS (with account):

const csnjs = require("csn.js");

const client = new csnjs.Client();

CSNClient.on("login", async function() {
    const song = await client.search.song("Shape of you");
    const links = await song[0].getAudioUrl();
    console.log(links);
});

CSNClient.login({ email: "Your email", password: "Your password" });

Typescript/ESM/ES (no account):

import * as csnjs from "csn.js";

(async() => {
    const client = new csnjs.Client();

    const song = await client.search.song("Shape of you");
    const links = await song[0].getAudioUrl();

    console.log(links);
})();

Typescript/ESM/ES (with account):

import * as csnjs from "csn.js";

const client = new csnjs.Client();

CSNClient.on("login", async function() {
    const song = await client.search.song("Shape of you");
    const links = await song[0].getAudioUrl();
    console.log(links);
});

CSNClient.login({ email: "Your email", password: "Your password" });

License

Published with MIT license.

1.1.0

1 year ago

1.0.0

1 year ago

0.6.3

1 year ago

0.6.2

1 year ago

0.6.5

1 year ago

0.5.0

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago