SpaceApi / schema

SpaceAPI JSON schema files.
24 stars 14 forks source link

All currency properties should allow ISO codes from ISO 4217 #5

Closed the-metalgamer closed 7 years ago

the-metalgamer commented 7 years ago

All currency related properties should allow all ISO codes from ISO 4217 Official Spreadsheet

It only requires adding all the ISO codes to the enum.

This does currently only affect sensors.account_balance.

dbrgn commented 7 years ago

I'd actually remove that enum. Let's simply make it a string and ask people to use ISO 4217 format. An API update should not be necessary just because there's a new (crypto?)currency.

I wonder how this field is actually being used. Right now there seem to be 2 spaces publishing an account balance:

+ Checking space Edinburgh Hacklab
  Account balance: [{'value': 1.03163697, 'unit': 'BTC', 'location': 'Bitcoin'}]
+ Checking space FabLab Nürnberg
  Account balance: [{'value': 844.3, 'unit': 'EUR', 'name': 'Matomat Balance', 'description': 'Summarized balance of all Matomat2 users'}]
the-metalgamer commented 7 years ago

I'd actually remove that enum. Let's simply make it a string and ask people to use ISO 4217 format. An API update should not be necessary just because there's a new (crypto?)currency

Right, I do a pull request!