GithubHelp home page GithubHelp logo

sunsalauddin / obd-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pires/obd-server

0.0 0.0 0.0 225 KB

Webapp responsible for storing OBD (Android OBD Reader) readings.

License: Apache License 2.0

Shell 17.29% Java 82.71%

obd-server's Introduction

obd-server

REST API for storing OBD-II readings from Android OBD-II Reader.

Attention: the storage is ephemeral since it relies on an in-memory database. I've made this decision for the sake of deployment simplicity.

Pre-requisites

  1. JDK 8
  2. Maven 3.3.0 or newer

Build

mvn clean package

Run

mvn spring-boot:run

Test

Add records

$ ./tests/put_some_stuff.sh
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Sun, 02 Aug 2015 21:07:12 GMT

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Sun, 02 Aug 2015 21:07:12 GMT

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Sun, 02 Aug 2015 21:07:12 GMT

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Length: 0
Date: Sun, 02 Aug 2015 21:07:12 GMT

Read records for a certain VIN

Reading records is a paginated operation. Set page (defaults to 0) and size (defaults to 100) query parameters if you want to paginate.

./tests/read_testvin_json.sh
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Sun, 02 Aug 2015 21:14:14 GMT

{
  "content":[
    {
      "id":1,
      "version":0,
      "latitude":40.0,
      "longitude":-8.1,
      "timestamp":1234567890,
      "vin":"testvin",
      "readings":{
        "rpm":"3000",
        "speed":"55"
      }
    },
    {
      "id":2,
      "version":0,
      "latitude":40.1,
      "longitude":-8.2,
      "timestamp":1234568999,
      "vin":"testvin",
      "readings":{
        "rpm":"3200",
        "speed":"65"
      }
    },
    {
      "id":3,
      "version":0,
      "latitude":40.2,
      "longitude":-8.3,
      "timestamp":1234589999,
      "vin":"testvin",
      "readings":{
        "rpm":"4000",
        "speed":"75"
      }
    }
  ],
  "last":true,
  "totalPages":1,
  "totalElements":3,
  "size":100,
  "number":0,
  "sort":null,
  "first":true,
  "numberOfElements":3
}

obd-server's People

Contributors

pires 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.