Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dbaelz opened this issue Sep 19, 2017 · 2 comments
Open

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

dbaelz opened this issue Sep 19, 2017 · 2 comments
Labels

Comments

@dbaelz
Copy link

dbaelz commented Sep 19, 2017

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"
}
@ubergesundheit
Copy link
Member

Good suggestion! Another place where an resource link could be returned is the image of the box (in the same call).

We're planning to rebuild the sensor definitions soon and will think about including links to these kind of resources!

As you maybe already know, the icons are implemented as webfont, which you'll find here. Maybe this will help you short-term.

@mpfeil mpfeil added the v7 label Nov 20, 2018
@nobodyinperson
Copy link

This would also help me a lot with OpenSenseFish, my SailfishOS app to access the OpenSenseMap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants