roxlukas / lmeve

LMeve - industry manager and contribution tracker for EVE Online
https://pozniak.pl/wp/
Other
52 stars 13 forks source link

Northbound TASKS API numbers as strings #55

Closed maurerit closed 5 years ago

maurerit commented 5 years ago

Some of the numbers in the TASKS endpoints are coming across as strings in the JSON where as others are numbers:

"name": "Some Person", "characterID": 1234567, "typeName": "Some Thing", "typeID": 1234, "activityName": "Manufacturing", "activityID": 1, "taskID": 2000000, "runs": 800, "taskCreateTimestamp": "2018-10-01 00:00:00", "singleton": 1, "runsDone": "800", "jobsDone": 3, "jobsSuccess": "0", "jobsCompleted": 0, "runsCompleted": "200"

The main numbers I'm concerned about here are the runsDone, jobsSuccess and runsCompleted. I'm tentatively planning some integrations with this endpoint and having them as numbers would be ideal to avoid any funky work arounds to pull them into the primitives that they'll land in.

roxlukas commented 5 years ago

This is both PHP's greatest power and greatest weakness: weak typing. And also my failure as a programmer who claims to know and understand these weaknesses. I'll add additional output filters to prevent this.

roxlukas commented 5 years ago

Fixed in 9810ad5