Skip to content

Backtube's backend API repository. Contains API endpoints allowing to perform CRUD against Backtube's MongoDB backend and AWS Cognito service

License

Notifications You must be signed in to change notification settings

chaos87/backtube-backend-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BackTube

BackTube is a streaming app for music lovers who can create and follow playlists of their favorite songs from Youtube or Bandcamp.

There are 4 different repositories:

Installation

Use the package manager npm to install the UI.

npm install

Usage

npm start

Example of API call using cURL

curl \
  -H 'Content-Type: application/json' \
  -H 'accessToken': <YOUR ACCESS TOKEN>
  -X POST \
  -d '{"searchString": "nirvana"}' \
  http://localhost:5000/api/playlist/search/

Endpoints

  • [POST] /public/playlists/recent: Retrieve most recent playlists updated on BackTube (No Authentication needed)
  • [POST] /auth/register: Register a user (No Authentication needed)
  • [POST] /auth/login: Login (No Authentication needed)
  • [POST] /auth/confirm: Confirm user registration (No Authentication needed)
  • [POST] /auth/sendConfirmCode: Send confirm registration code to user provided email (No Authentication needed)
  • [POST] /auth/forgotPassword: Send forgot password email to user provided email (No Authentication needed)
  • [POST] /auth/resetPassword: Reset user's password using verification code in email (No Authentication needed)
  • [POST] /auth/refresh: Refresh user session (Authentication needed)
  • [PUT] /auth/user: Change username (Authentication needed) (Deprecated soon)
  • [PUT] /api/profile/: Update user profile (Authentication needed)
  • [GET] /api/profile/: Get user profile (Authentication needed)
  • [GET] /api/profile//playlists: Get user profile with playlists (Authentication needed)
  • [GET] /api/profile//playlistsNoTracks: Get user profile with playlists Id and Title (Authentication needed)
  • [GET] /api/playlist: Retrieve all playlists (max = 100) (Authentication needed)
  • [POST] /api/playlist: Create a playlist (Authentication needed)
  • [PUT] /api/playlist: Update a playlist (Authentication needed)
  • [DELETE] /api/playlist: Delete a playlist (Authentication needed)
  • [GET] /api/playlist/: Retrieve a playlist and its tracks (Authentication needed)
  • [PUT] /api/playlist//addFollower: Follow playlist (Authentication needed)
  • [PUT] /api/playlist//removeFollower: Unfollow playlist (Authentication needed)
  • [POST] /api/playlist/search: Fulltext search for playlists (indexed on playlist title, track title/artist/album) (Authentication needed)
  • [GET] /api/track/: Retrieve a specific track (Authentication needed)
  • [GET] /api/track: Retrieve all tracks (max = 100) (Authentication needed)
  • [GET] /api/track//playlists: Retrieve all playlists having this track (Authentication needed)

Live server

Currently deployed on Heroku https://api-backtube.herokuapp.com

Dependencies

Contributing

Please open an issue prior to submitting a pull request, so that we can discuss whether it makes sense to be implemented or not. Feature ideas or bug reports are more than welcome!

License

MIT

About

Backtube's backend API repository. Contains API endpoints allowing to perform CRUD against Backtube's MongoDB backend and AWS Cognito service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published