GithubHelp home page GithubHelp logo

danisyellis / music-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hstevemcdonald/music-app

0.0 2.0 0.0 4.41 MB

Music App - REST API for Music App

License: MIT License

JavaScript 96.27% Shell 1.57% CSS 0.67% HTML 1.48%

music-app's Introduction

Music-App

Init #3: Hello, Web Servers

#Local Installation Instructions

  1. Run command git clone https://github.com/eastnorthwest/Music-App
  2. Change into the directory "Music-App"
  3. Run command npm install
  4. Run these commands in order: "npm run db:create", "npm run db:setup", "npm run db:seed"
  5. Run command npm start

#Heroku Installation Instructions

  1. Install Heroku CLI and login to Heroku if necessary https://devcenter.heroku.com/articles/heroku-cli
  2. Run command git clone https://github.com/eastnorthwest/Music-App
  3. Change into the directory "Music-App"
  4. Run command heroku create
  5. Run command heroku buildpacks:set heroku/nodejs
  6. Run command heroku addons:create heroku-postgresql
  7. Run command heroku pg:psql < ./db/schema.sql
  8. Run command heroku pg:psql < ./db/data.sql
  9. Run command git push heroku master

#Accessing the API

Get all artists

https://lg-filthy-flamingo-music-app.herokuapp.com/api/artist/all

Get an artist by id.

https://lg-filthy-flamingo-music-app.herokuapp.com/api/artist/1

Get an artist by name. NAME = name.

https://lg-filthy-flamingo-music-app.herokuapp.com/api/artist/name/Santogold

Add new artist

https://lg-filthy-flamingo-music-app.herokuapp.com/api/artist POST


{
  name: "Artist Name",
  genre: "Genre",
  image: "http://www.theimageurl.com"
}

Edit artist

https://lg-filthy-flamingo-music-app.herokuapp.com/api/artist PUT


{
  id: 1,
  name: "Artist Name",
  genre: "Genre",
  image: "http://www.theimageurl.com"
}

Delete artist

https://lg-filthy-flamingo-music-app.herokuapp.com/api/artist DELETE


{
  id: 1
}

Get all albums

https://lg-filthy-flamingo-music-app.herokuapp.com/api/albums/all

Get an album by id.

https://lg-filthy-flamingo-music-app.herokuapp.com/api/album/1

Add new album

https://lg-filthy-flamingo-music-app.herokuapp.com/api/album POST


{
  name: "Album Name",
  artist_id: 1,
  image: "http://www.theimageurl.com"
}

Edit album

https://lg-filthy-flamingo-music-app.herokuapp.com/api/album PUT


{
  id: 1,
  name: "Album Name",
  image: "http://www.theimageurl.com"
}

Delete album

https://lg-filthy-flamingo-music-app.herokuapp.com/api/artist DELETE


{
  id: 1
}

Get all songs

https://lg-filthy-flamingo-music-app.herokuapp.com/api/song/all

Get all songs in an album

https://lg-filthy-flamingo-music-app.herokuapp.com/api/song/album/ALBUMNAME

Get all songs by an artist

https://lg-filthy-flamingo-music-app.herokuapp.com/api/songs/artist/ARTISTNAME

Get an song by id.

https://lg-filthy-flamingo-music-app.herokuapp.com/api/song/1

Add new song

https://lg-filthy-flamingo-music-app.herokuapp.com/api/song POST


{
  name: "Song Name",
  album_id: 1
}

Edit song

https://lg-filthy-flamingo-music-app.herokuapp.com/api/song PUT


{
  id: 1,
  name: "Song Name"
}

Delete song

https://lg-filthy-flamingo-music-app.herokuapp.com/api/song DELETE


{
  id: 1
}

Get all playlists

https://lg-filthy-flamingo-music-app.herokuapp.com/api/playlist/all

Get all songs in a playlist

https://lg-filthy-flamingo-music-app.herokuapp.com/api/playlist/songs/2

Add a song to a playlist

https://lg-filthy-flamingo-music-app.herokuapp.com/api/playlist/song POST


{
  playlist_id: 1,
  album_id: 1
}

Get an playlist by id.

https://lg-filthy-flamingo-music-app.herokuapp.com/api/playlist/1

Add new playlist

https://lg-filthy-flamingo-music-app.herokuapp.com/api/playlist POST


{
  name: "Playlist Name",
  album_id: 1
}

Edit playlist

https://lg-filthy-flamingo-music-app.herokuapp.com/api/playlist PUT


{
  id: 1,
  name: "Playlist Name"
}

Delete playlist

https://lg-filthy-flamingo-music-app.herokuapp.com/api/song DELETE


{
  id: 1
}

music-app's People

Contributors

danisyellis avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.