Skip to content

Commit a71ffa0

Browse files
committed
support NPM
1 parent f237b08 commit a71ffa0

File tree

7 files changed

+29
-23
lines changed

7 files changed

+29
-23
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Suno-Deno is a library designed for interacting with the Suno AI music generatio
1515
To install the library, you need to have [Node.js](https://nodejs.org/) installed. Run the following command to install the necessary dependencies:
1616

1717
```bash
18-
npm install
18+
npm install suno-deno
1919
```
2020

2121
Alternatively, if you are using Deno, no additional dependencies are required.
@@ -28,13 +28,16 @@ Here's how you can use Suno-Ma to generate and retrieve song links as buffer dat
2828
Create a file named `test-my-ai-music.js` and use the following code as an example:
2929

3030
```javascript
31-
import SenoDeno from './SenoDeno.js';
31+
import SunoDeno from 'suno-deno';
32+
// if deno land
33+
34+
// import SunoDeno from 'https://unpkg.com/suno-deno';
3235

3336
async function main() {
3437
try {
3538
const cookie = 'your_cookie';
3639
const sid = 'your_sid';
37-
const suno = new SenoDeno(sid, cookie);
40+
const suno = new SunoDeno(sid, cookie);
3841

3942
await suno.init();
4043

@@ -91,7 +94,7 @@ deno run --allow-net test-my-ai-music.js
9194

9295
#### `init()`
9396

94-
Initializes the SenoDeno instance and renews the authentication token.
97+
Initializes the SunoDeno instance and renews the authentication token.
9598

9699
#### `getLimitLeft()`
97100

hono.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Hono } from "hono";
2-
import SenoDeno from "./src/SenoDeno.js";
2+
import SunoDeno from "suno-deno";
33

4-
const suno = new SenoDeno("your_sid", "your_cookie");
4+
const suno = new SunoDeno("your_sid", "your_cookie");
55
await suno.init();
66

77
const app = new Hono();

main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
import SunoDeno from "./src/SenoDeno.js";
1+
import SunoDeno from "./src/SunoDeno.js";
22
export default SunoDeno

package-lock.json

Lines changed: 9 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
22
"name": "suno-deno",
3-
"version": "0.7",
3+
"version": "0.7.0",
44
"description": "A project to interact with SunoAI API",
55
"main": "main.js",
66
"type": "module",
77
"author": "Brahim Bidi",
8-
"license": "MIT"
8+
"license": "MIT",
9+
"dependencies": {
10+
"suno-deno": "^0.7.0"
11+
}
912
}
File renamed without changes.

test-my-ai-music.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
import SenoDeno from "./src/SenoDeno.js";
1+
2+
//import SunoDeno from "./src/SunoDeno.js";
3+
4+
import SunoDeno from 'suno-deno';
25

36
async function main(sid, cookie) {
47
try {
5-
const suno = new SenoDeno(sid, cookie);
8+
const suno = new SunoDeno(sid, cookie);
69

710
await suno.init();
811

0 commit comments

Comments
 (0)