Skip to content

Provide the sensor icon and a link by the API #117

@dbaelz

Description

@dbaelz

As an external developer who uses the API it's extremely helpful when the API supplies not only the required information, but also the referenced assets. At the moment the openSenseMap-API reference some standard osem-* icons. As far as I can see, there's no way to fetch these resources with the API.

It would be convenient if the API provides:

  • The sensor icon (e.g. osem-humidity) as image file like png or jpg. This asset could be provided with an separate API-call as static resource.
  • A link to the sensor icon asset in the sensor data json.

Example of an expanded sensor data entry (extract from the Get one senseBox call)

{
    "_id": "579f9eae68b4a2120069edc8",
    "sensorType": "VCC",
    "unit": "V",
    "title": "Eingangsspannung",
    "lastMeasurement": {
        "value": "2.73",
        "createdAt": "2016-11-11T21:22:01.675Z"
    },
    "icon": "osem-shock",
    "icon-url": "https://api.opensensemap.org/assets/osem-humidity.png"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions