Skip to content

Praneet460/Audio-Store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Name - Audio Store

It is an Audio Store API, build purely using Python (programming language), Django and Django-Rest-Framework (opensource framework written in python). The Audio Store contains 3 types of audio files - Song, Podcast and Audiobook . The API provide you access to GET, POST, PUT and DELETE requests.

Setup settings

  • src/manage.py : src.settings.development (Prefer) / src.settings.production
  • pip install requirements.txt
  • python manage.py test
  • python manage.py runserver

Files Path

  • Audio File Type Models : audio.models
  • Audio File Type Models Tests : audio.tests.models
  • Audio File Type API View : api.views
  • Audio File Type API View Tests : api.tests.views

API EndPoints

API Endpoints defines the structure of the API and how end users access data from our application using the HTTP methods - GET, POST, PUT, DELETE.

BASE URL : /api/v1

Endpoint HTTP Method CURD Method Result
song/ POST CREATE Create a new song
podcast/ POST CREATE Create a new podcast
audiobook/ POST CREATE Create a new audiobook
song/<int:audioFileID> GET READ Get a song details
song/ GET READ Get all songs details
podcast/<int:audioFileID> GET READ Get a podcast details
podcast/ GET READ Get all podcast details
audiobook/<int:audioFileID> GET READ Get an audiobook details
audiobook/ GET READ Get all audiobook details
song/<int:audioFileID> PUT UPDATE UPDATE a song details
podcast/<int:audioFileID> PUT UPDATE UPDATE a podcast details
audiobook/<int:audioFileID> PUT UPDATE UPDATE an audiobook details
song/<int:audioFileID> DELETE DELETE UPDATE a song details
podcast/<int:audioFileID> DELETE DELETE UPDATE a podcast details
audiobook/<int:audioFileID> DELETE DELETE UPDATE an audiobook details

Examples

  • GET : ```/api/v1/song/

    • Response
      [
          {
              "id": 1,
              "audio_title": "End of Time",
              "audio_duration": 188,
              "date_uploaded": "2021-04-16T19:59:58.143261Z"
          },
          {
              "id": 2,
              "audio_title": "Faded",
              "audio_duration": 180,
              "date_uploaded": "2021-04-17T02:23:32.653622Z"
          },
          {
              "id": 7,
              "audio_title": "Sunshine",
              "audio_duration": 198,
              "date_uploaded": "2021-04-17T06:42:46.813823Z"
          }
      ]
      
  • PUT : /api/v1/audiobook/1

    • Request
      {
          "audio_title": "The Secret Garden",
          "audio_duration": 12000,
          "author": "Frances Hodgson",
          "narrator": "DBS"
      }
      
    • Response
      {
          "id": 1,
          "audio_title": "The Secret Garden",
          "audio_duration": 12000,
          "date_uploaded": "2021-04-16T20:02:07.549360Z",
          "author": "Frances Hodgson",
          "narrator": "DBS"
      }
      
  • POST : /api/v1/podcast/1

    • Request
      {
          "audio_title": "Python Basics",
          "audio_duration": 400,
          "host": "Alex",
          "participants": ["Praneet", "Robert", "William"] 
      }
      
  • DELETE : /api/v1/song/3

    • Response
    {
        "message": "Deleted"
    }
    

About

Audio Store API perform CURD Operations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages