Giter Club home page Giter Club logo

tr-ci-cd-be's Introduction

Endpoints

Time

Endpoint: /time Response

{
  "timestamp": 1467900957
}

Time for a city

Endpoint: /time?city={cityName} Response

{
  "timestamp": 1467900957,
  "name": "London",
  "offset": 0
}

Time for all cities

Endpoint: /times Response:

{
  "Nottingham":1467902134848,
  "Paris":1467905734848
}

List of cities

Endpoint: /cities Example Response:

{
  "_embedded" : {
    "cities" : [ {
      "name" : "Nottingham",
      "offset" : 0,
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/cities/577e6845bd6ab2e34a97a3d5"
        },
        "city" : {
          "href" : "http://localhost:8080/cities/577e6845bd6ab2e34a97a3d5"
        }
      }
    }, {
      "name" : "Paris",
      "offset" : 1,
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/cities/577e6845bd6ab2e34a97a3d6"
        },
        "city" : {
          "href" : "http://localhost:8080/cities/577e6845bd6ab2e34a97a3d6"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/cities"
    },
    "profile" : {
      "href" : "http://localhost:8080/profile/cities"
    },
    "search" : {
      "href" : "http://localhost:8080/cities/search"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

Adding a new city

POST /cities

{
    "name":"Birmingham",
    "offset": 0
}

Base REST endpoint for cities

Configuration

By default will attempt to connect to MongoDB on mongodb://localhost/test. The spring.data.mongodb.uri system property can be used to alter this.

tr-ci-cd-be's People

Contributors

uncinimichel avatar miguelgonz 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.