1.0.3 • Published 2 months ago

sptify-server v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Spotify Playlist Server

Simple Spotify Playlist Server is a REST service built with Express.js. It allows users to manage playlists and songs. The application follows clean architecture principles to ensure modularity and maintainability.

API Endpoints

MethodEndpointDescription
GET/playlistsGet the list of all playlists
GET/playlists/:playlistIdGet details of a specific playlist
GET/playlists/:playlistId?sort_by=playedSort tracks in a specific playlist by play count
POST/playlistsCreate a new playlist
PUT/playlists/:playlistIdUpdate details of a specific playlist
DELETE/playlists/:playlistIdDelete a specific playlist
GET/playlists/:playlistId/tracks/:songIdGet details of a specific song from a playlist
GET/playlists/:playlistId/tracks/:songId/playPlay a song from a playlist
POST/playlists/:playlistId/tracksAdd a song to a specific playlist
DELETE/playlists/:playlistId/tracks/:songIdRemove a specific song from a playlist

Request Body Format

  • Create & update playlist: { "name": , "description": }

  • Adding a song to the playlist:

    { "title": <>title, "artists": , "album": , "external_url": }

Swagger Documentation

You can explore and test the API endpoints using the Swagger documentation. To access the Swagger UI, please follow these steps:

  1. Make sure the Simple Spotify Playlist Server is running.
  2. Open your web browser and enter the following URL:

    http://localhost:3000/api-docs

    Note: Replace localhost:3000 with the appropriate server address and port if your server is running on a different host or port.

  3. The Swagger UI will open, where you can see a list of available endpoints and methods. You can click on an endpoint to view its details, including parameters and responses. You can also use the Swagger UI to send requests and view responses directly from the browser.

The Swagger documentation provides an intuitive interface for developers to understand and interact with the Simple Spotify Playlist Server API effectively.