Skip to content

🕵️‍♀️ Automated parsing of wanted transport & API

License

Notifications You must be signed in to change notification settings

opencars/wanted

Repository files navigation

Wanted Vehicles

Development

Build the binary

make

Start postgres

docker-compose up -Vd postgres

Run sql migrations

migrate -source file:https://migrations -database postgres:https://postgres:[email protected]/wanted\?sslmode=disable up

Run the web server

./bin/server

Test

Start postgres

docker-compose up -Vd postgres

Run sql migrations

migrate -source file:https://migrations -database postgres:https://postgres:[email protected]/wanted\?sslmode=disable up

Run tests

go test -race -bench=. -v ./...

Usage

For example, get information about this amazing Tesla Model S

http http:https://localhost:8080/api/v1/wanted/vehicles?number=СВ5501ВХ
[
    {
        "body_number": "5YJSA1E28HF176944",
        "brand": "TESLA - MODEL S",
        "color": "СІРИЙ",
        "id": "3019228562749883",
        "insert_date": "2019-08-16T15:37:54Z",
        "kind": "ЛЕГКОВИЙ",
        "number": "СВ5501ВХ",
        "ovd": "СОЛОМ’ЯНСЬКЕ УПРАВЛІННЯ ПОЛІЦІЇ ГУНП В М. КИЄВІ",
        "revision_id": "17082019_1",
        "status": "removed",
        "theft_date": "2019-08-16"
    }
]

License

Project released under the terms of the MIT license.