Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cestef/spotify-card
Generate spotify embeds using canvas
https://github.com/cestef/spotify-card
canvas discord spotify typescript
Last synced: about 1 month ago
JSON representation
Generate spotify embeds using canvas
- Host: GitHub
- URL: https://github.com/cestef/spotify-card
- Owner: cestef
- License: mit
- Created: 2021-09-29T15:30:56.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-21T09:43:08.000Z (over 2 years ago)
- Last Synced: 2024-10-04T17:18:50.293Z (about 1 month ago)
- Topics: canvas, discord, spotify, typescript
- Language: TypeScript
- Homepage: https://docs.cstef.dev/docs/spotify-card/
- Size: 25.1 MB
- Stars: 23
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Generate song embeds easily !
![Preview](media/preview.png)# spotify-card
## Table of Contents
- [About](#about)
- [Prerequisites](#prerequisites)
- [Installing](#installing)
- [Usage](#usage)This is a nodejs utility to generate song embeds using [skia-canvas](https://github.com/samizdatco/skia-canvas).
The package is named `spotify-card` because I wanted to only add spotify support at the beginning but I ended up adding support for other platforms.
Currently supported plaforms: `Spotify`, `Soundcloud`, `Youtube` and `Deezer`
- [nodejs](https://nodejs.org)
You can install this package from the [npm](https://npmjs.com) registry
```
yarn add spotify-card
```or with the npm cli:
```
npm install spotify-card
```### Example (typescript)
```ts
import { generate } from "spotify-card";
import path from "path";
import fs from "fs";(async () => {
const image = await generate({
url: "spotify:track:33yAEqzKXexYM3WlOYtTfQ",
});
fs.writeFileSync(path.join(__dirname, "test_image.png"), image);
})();```