GithubHelp home page GithubHelp logo

backend's Introduction

Backend

CLI only playlists for books and songs

Authors

  • Diego Palmerín Bonada A01747290
  • Zoe Caballero Domínguez A01747247

##Methods

Post

Crea un nuevo documento en la base de datos.

####Playlist:

#####Crear Playlist path: /playlist body:

{
    name: "Nombre Playlist",
    privacy: "Public",
    description: "This is a playlist"
}

#####Agregar media a playlist path: /playlist/idPlaylist body:

{
    itemId: "id de documento"
}

#####Crear Media y agregarlo a playlist path: /playlist/idPlaylist body:

{
    name: "Hamlet"
    type: "Book",
    privacy: "Private",
    author: "Shakespeare"
    description: "Drama Play. Everyone dies"
}

####Media:

{
    name: "Hamlet"
    type: "Book",
    privacy: "Private",
    author: "Shakespeare"
    description: "Drama Play. Everyone dies"
}

####Validaciones

#####Playlist

name: Name must be string. Name must be between 5 and 50 characters.

privacy: Value can only be "Public" or "Private".

description: Description must be between 10 and 250 characters.

#####Media

name: Name must be string. Name must be between 5 and 50 characters.

type: Value can only be "Book" or "Song".

privacy: Value can only be "Public" or "Private".

author: Must be string. Must be between 5 and 50 characters.

description: Description must be between 10 and 250 characters.

Get

Regresa los datos registrados en la base de datos. La persona usuaria puede mandar un id en específico.

path: /playlist

Sin ningún otro argumento, regresa todas las playlists asociadas con la sesión actual o públicas

Igualmente, puede recibir un id en el cuerpo body

{
    id: "1234567"
}

URL params /playlist/id

Validaciones

id: que el id se encuentre en la base de datos.

Dependiendo de la privacidad, se permitirá o no el acceso a esta información

Put

Actualiza la información de un documento dado.

path: /playlist o /media body

{
    id: "1234567",
    name: "New Name"
}

####Validaciones

id: que el id se encuentre en la base de datos. datos: que sean del tipo correcto y cumplan con sus limitaciones

###Delete Elimina el documento que tiene el id mandado por la persona usuaria.

path: /playlist o /media body

{
    id: "1234567"
}

Validaciones id: que el id se encuentre en la base de datos.

backend's People

Contributors

dpalme avatar zoecd avatar dependabot[bot] avatar

Watchers

 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.