Coder Social home page Coder Social logo

parking_service's Introduction

ParkingService

To start server:

  • Install dependencies with mix deps.get
  • Start Phoenix server with mix phx.server

Configured resources:

  resources: [
    %{id: 534_001, refresh_period: 1},
    %{id: 534_002, refresh_period: 4},
    %{id: 534_003, refresh_period: 5},
    %{id: 534_004, refresh_period: 6},
    %{id: 534_005, refresh_period: 5},
    %{id: 534_013, refresh_period: 5},
    %{id: 534_007, refresh_period: 6}
  ]

Endpoint localhost:4000/parkings/534001 for getting data about parking places:

curl http://localhost:4000/parkings/534001 | jq .

Due to the initial 1 minute delay of the crawler and the refresh_period of 1 minute the data will be sync in about 2 minutes for resource 534001

Endpoint /crawlers/534013 for changing refresh_period for a particular resource:

curl -X POST -H "Content-Type: application/json" \
 -d '{"refresh_period": 8}' \
 http://localhost:4000/crawlers/534013

parking_service's People

Contributors

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