LdDl / rust-road-traffic

Vehicle counting/tracking and speed estimation
17 stars 3 forks source link

[FEATURE REQUEST] REST #2

Closed LdDl closed 2 years ago

LdDl commented 2 years ago

Is your feature request related to a problem? Please describe. Consider REST side for this application. Server should response with something like this:

{
    "data": [
        {
            "polygon_id": "UUID_v4",
            "period_start": "UnixTimestampUTC",
            "period_end": "UnixTimestampUTC",
            "statistics": [
                {
                    "vehicle_type": "car",
                    "sum_intensity": 100500,
                    "avg_speed": 45.15
                },
                {
                    "vehicle_type": "truck",
                    "sum_intensity": 200600,
                    "avg_speed": 53.12
                }
            ]
        }
    ]
}

Describe the solution you'd like and provide pseudocode examples if you can Take actix and implement REST side

Describe alternatives you've considered and provide pseudocode examples if you can nope

Additional context

  1. I'll struggle a bit with reference passing (due Im' Rust novice)
  2. Need to add example (cURL)