Git Product home page Git Product logo

stentle-project's Introduction

stentle-project

API 1

  • Endpoint: http://localhost/ex­1/alumni
  • HTTP method: POST
  • Headers:
    • Content­Type: application/json
    • RequestBody: {“name”:”nome”, “addresses”:[ { “street”:”streetname”, “number”:”22”, “country”:”country”}, { “street”:”streetname2”, “number”:”33”, “country”:”country”} ], “education”:{ “master”:{“university”:”Politecnico Milano”, year: 2004}, “phd”:{“university”:”UCSD”, year: 2009} } }

API 1 saves the payload on a local DB and:

  • validate the payload so that only completed address are accepted
  • validate the payload so that the street number of each address contains numbers only
  • validate the payload so that the name contains letters only

API 2

  • Endpoint: http://localhost/ex­1/alumni
  • Request Parameters:
    • name (optional): the name
    • education (optional): the education level (master/phd)
    • page (optional): the page index
    • size (optional): the page size
  • HTTP method: GET
  • Headers:
    • Content­Type: application/json
    • Response Body: { “totalCount”: [total number of records], "totalPages": [total number of pages], "page": [the current page index], “data:”[the list of elements found] }

API 2 allows to retrieve the alumni already stored. Results are paged. If no input parameters are given, the API returns all the alumni stored with default paging parameters (page=0, size=20).

stentle-project's People

Contributors

gioiab avatar

Watchers

 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.