Code Monkey home page Code Monkey logo

p7's People

Contributors

giildo avatar

Watchers

 avatar

Forkers

malronwall

p7's Issues

[Phones] - The details of a phone

Goal

As an Client connected, I need to be able to collect a details of one phone to the database.

Start

  • Client request to "/api/phones/{id}", with :
    • {id} : the phone ID
    • Bearer token in the headers of the Request
    • Method : GET

Technical contraints

  • The Client must be connected and he must send the Bearer token to the headers of the Request
  • The Client must have the phone ID. He can collect this ID in the phones list.

Scenarios

  • The Client has no token, bad token or expired token : Response 401 with the error content :
    • TOKEN_EXPIRED : "La durée de validité de votre Token est dépassée, veuillez vous reconnecter."
    • TOKEN_INVALID : "Votre Token de connexion est invalide, veuillez vous reconnecter."
    • NO_TOKEN : "Aucun Token de connexion n'a été trouvé, veuillez vous connecter."
  • The Client has a good token :
    • No phone founds in the database : Response 404 with the error content : "No phone found in the database, please check your input parameters."
    • Phone founds in the database : Response 200 with JSON array with phone in the Response content.

Diagrams

Physical model of data

dpd-phone

Sequence diagram

sequence diagram-phone show

Class diagram

class diagram-phone show

To do

  • Domain Model Diagram
  • Class Diagram
  • Feature

[Users] - The details of a user

Goal

As an Client connected, I need to be able to collect a details of one user to the database.

Start

  • Client request to "/api/client/{client}/users/{id}", with :
    • {client} : their Client ID
    • {id} : the user ID
    • Bearer token in the headers of the Request
    • Method : GET

Technical contraints

  • The Client must be connected and he must send the Bearer token to the headers of the Request
  • The Client must have the user ID. He can collect this ID in the users list.

Scenarios

  • The Client has no token, bad token or expired token : Response 401 with the error content :
    • TOKEN_EXPIRED : "La durée de validité de votre Token est dépassée, veuillez vous reconnecter."
    • TOKEN_INVALID : "Votre Token de connexion est invalide, veuillez vous reconnecter."
    • NO_TOKEN : "Aucun Token de connexion n'a été trouvé, veuillez vous connecter."
  • The Client has a good token :
    • No user founds in the database : Response 404 with the error content : "No user found in the database, please check your input parameters."
    • Users found in the database : Response 200 with JSON array with user in the Response content.

Diagrams

Physical model of data

dpd-user

Sequence diagram

sequence diagram-user show

Class diagram

class diagram-user show

To do

  • Domain Model Diagram
  • Class Diagram
  • Feature

[Phones] - The list of phones

Goal

As an Client connected, I need to be able to collect a phones list to the database.

Start

  • Client request to "/api/phones", with :
    • Bearer token in the headers of the Request
    • Method : GET

Technical contraints

  • The Client must be connected and he must send the Bearer token to the headers of the Request
  • The Client can filtered the list with three parameters :
    • limit : number of phone collects to the database
    • offset : the first phone in the database
    • brand : the phone brand

Scenarios

  • The Client has no token, bad token or expired token : Response 401 with the error content :
    • TOKEN_EXPIRED : "La durée de validité de votre Token est dépassée, veuillez vous reconnecter."
    • TOKEN_INVALID : "Votre Token de connexion est invalide, veuillez vous reconnecter."
    • NO_TOKEN : "Aucun Token de connexion n'a été trouvé, veuillez vous connecter."
  • The Client has a good token :
    • No phone founds in the database : Response 404 with the error content : "No phone found in the database, please check your input parameters."
    • Phones found in the database : Response 200 with JSON array with phones in the Response content.

Diagrams

Physical model of data

dpd-phone

Sequence diagram

sequence diagram-list phone

Class diagram

class diagram-list phones

To do

  • Domain Model Diagram
  • Class Diagram
  • Feature

[Users] - The list of users

Goal

As an Client connected, I need to be able to collect my users list to the database.

Start

  • Client request to "/api/client/{client}/users", with :
    • {client} : their Client ID
    • Bearer token in the headers of the Request
    • Method : GET

Technical contraints

  • The Client must be connected and he must send the Bearer token to the headers of the Request
  • The Client can filtered the list with three parameters :
    • limit : number of user collects to the database
    • offset : the first user in the database
    • {client} (required) : the client ID

Scenarios

  • The Client has no token, bad token or expired token : Response 401 with the error content :
    • TOKEN_EXPIRED : "La durée de validité de votre Token est dépassée, veuillez vous reconnecter."
    • TOKEN_INVALID : "Votre Token de connexion est invalide, veuillez vous reconnecter."
    • NO_TOKEN : "Aucun Token de connexion n'a été trouvé, veuillez vous connecter."
  • The Client has a good token :
    • No user founds in the database : Response 404 with the error content : "No user found in the database, please check your input parameters."
    • Users found in the database : Response 200 with JSON array with users in the Response content.

Diagrams

Physical model of data

dpd-user

Sequence diagram

sequence diagram-list user

Class diagram

class diagram-list user

To do

  • Domain Model Diagram
  • Class Diagram
  • Feature

[Users] - Deleting a user

Goal

As an Client connected, I need to be able to delete a user to the database.

Start

  • Client request to "/api/client/{client}/users/{id}", with :
    • {client} : their Client ID
    • {id} : the user ID
    • Bearer token in the headers of the Request
    • Method : DELETE

Technical contraints

  • The Client must be connected and he must send the Bearer token to the headers of the Request
  • The Client must have the user ID. He can collect this ID in the users list.

Scenarios

  • The Client has no token, bad token or expired token : Response 401 with the error content :
    • TOKEN_EXPIRED : "La durée de validité de votre Token est dépassée, veuillez vous reconnecter."
    • TOKEN_INVALID : "Votre Token de connexion est invalide, veuillez vous reconnecter."
    • NO_TOKEN : "Aucun Token de connexion n'a été trouvé, veuillez vous connecter."
  • The Client has a good token :
    • No user founds in the database : Response 404 with the error content : "No user found in the database, please check your input parameters."
    • User deleted in the database : Response 204

Diagrams

Physical model of data

dpd-user

Sequence diagram

sequence diagram-user delete

Class diagram

class diagram-user delete

To do

  • Domain Model Diagram
  • Class Diagram
  • Feature

[Users] - Creating a user

Goal

As an Client connected, I need to be able to collect a details of one user to the database.

Start

  • Client request to "/api/client/{client}/users", with :
    • {client} : their Client ID
    • Bearer token in the headers of the Request
    • Method : POST + datas of new user in the headers of the Request

Technical contraints

  • The Client must be connected and he must send the Bearer token to the headers of the Request
  • The Client must send the datas of the new user in JSON array :
{
	"username": "username",
	"password": "password"
}

Scenarios

  • The Client has no token, bad token or expired token : Response 401 with the error content :
    • TOKEN_EXPIRED : "La durée de validité de votre Token est dépassée, veuillez vous reconnecter."
    • TOKEN_INVALID : "Votre Token de connexion est invalide, veuillez vous reconnecter."
    • NO_TOKEN : "Aucun Token de connexion n'a été trouvé, veuillez vous connecter."
  • The Client has a good token :
    • A user with this username exists in the database : Response 409 with the error content : "A user with the same username exists. Please choose another username."
    • User created in the database : Response 201 with JSON array with new user in the Response content.

Diagrams

Physical model of data

dpd-user

Sequence diagram

sequence diagram-new user

Class diagram

class diagram-new user

To do

  • Domain Model Diagram
  • Class Diagram
  • Feature

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.