Package Exports
- emg-api
- emg-api/server.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (emg-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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-apiInstall the required dependencies:
npm installUsage
Generate API Key
To generate an API key, send a POST request to /api/generate-key:
curl -X POST http://localhost:3000/api/generate-keyThe 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 testEnsure 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:your-email@example.com)) with actual values relevant to your project. - Include any additional configuration steps if needed for your API.
- Ensure links to files like
CONTRIBUTING.mdandLICENSEare accurate and accessible in your project.