openaq / openaq-api-v2

OpenAQ API
https://api.openaq.org
39 stars 9 forks source link

instruments endpoints #270

Closed russbiggs closed 9 months ago

russbiggs commented 9 months ago

Add instruments endpoints for v3. We'll want the standard /v3/instruments and /v3/instruments/{instruments_id} and a /v3/manufacturers/{manufacturers_id}/instruments. We an build out the list resource with the following query params:

The response model will look like this:

{
    "id": 42,
    "name": "FooBar",
    "description": "this is a description about the instrument",
    "manufacturer": {
        "id": 1,
        "name": "My Manufacturer"
    },
    "isMonitor": true,
    "locationsCount": 1234
}

Where the manufacturer key should be the ManufacturersBase model.