emg-api
v1.0.0
Published
The EMG Song API provides Extrinsic Music Group (EMG) and their clients with secure access to detailed Spotify playlist data. Users can generate unique API keys to retrieve comprehensive track information, including titles, artists, albums, release dates,
Downloads
5
Maintainers
Readme
title: EMG Spotify Playlist API description:The EMG Spotify Playlist API provides Extrinsic Music Group (EMG) and their clients with secure access to detailed Spotify playlist data. Users can generate unique API keys to retrieve comprehensive track information, including titles, artists, albums, release dates, durations, and BPM, by specifying a playlist ID.
Features
- Secure API Key Generation: Obtain unique, time-limited API keys for accessing playlist data.
- Detailed Track Information: Retrieve in-depth details about tracks, including title, artist, album, release date, duration, and BPM.
- Flexible Playlist Access: Fetch data for any Spotify playlist using its playlist ID.
Installation
Prerequisites
- Node.js (>= 14.x.x)
- npm (>= 6.x.x)
Install Dependencies
Clone the repository and navigate to the project directory:
git clone https://github.com/ExtrinsicMusicGroup/EMG-SONG-API.git
cd my-node-api
Install the required dependencies:
npm install
Usage
Generate API Key
To generate an API key, send a POST request to /api/generate-key
:
curl -X POST http://localhost:3000/api/generate-key
The response will include a unique API key:
{
"key": "your-api-key"
}
Fetch Playlist Details
Use the generated API key to fetch playlist details by sending a GET request to /api/playlist-details
with the id
query parameter:
curl -X GET "http://localhost:3000/api/playlist-details?id=<playlist-id>" -H "Authorization: Bearer <your-api-key>"
Replace <playlist-id>
with the ID of the Spotify playlist you want to query and <your-api-key>
with your generated API key.
Testing
To run tests for the API, use the following command:
npm test
Ensure your tests are correctly defined in the __tests__
directory.
Contributing
Contributions are welcome! If you find a bug or want to add a new feature, please open an issue or submit a pull request. Follow the CONTRIBUTING.md guidelines for more details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
For any inquiries, please contact EMG.
Tips:
- Replace placeholders (like
<repository-url>
,<your-api-key>
, and[Your Name](mailto:[email protected])
) with actual values relevant to your project. - Include any additional configuration steps if needed for your API.
- Ensure links to files like
CONTRIBUTING.md
andLICENSE
are accurate and accessible in your project.