Blacksmoke16 / GESI

Google Sheets™ ESI Add-on
https://blacksmoke16.github.io/GESI
MIT License
195 stars 35 forks source link

characters_character_planets_planet() gives plain json with bad structure #111

Closed mkocus closed 9 months ago

mkocus commented 9 months ago

Hello, I was trying to use characters_character_planets_planet() function and see that the results appears as the plain json, they are not parsed to sheet array.

Also, it looks that it only get the linksparts of the JSON response: https://esi.evetech.net/ui/#/Planetary%20Interaction/get_characters_character_id_planets_planet_id and totally ignores other important - pinsand routes.

Blacksmoke16 commented 9 months ago

See https://github.com/Blacksmoke16/GESI#why-does-this-cell-contain-all-this-random-data.

mkocus commented 9 months ago

OK, but how do I parseArray of pins and routes if the result of characters_character_planets_planet contains only the JSON for links?

If I do that: =parseArray("characters_character_planets_planet"; "links"; B56) it of course works (because B56 contain JSON for links)

but neither: =parseArray("characters_character_planets_planet"; "routes"; B56) nor: =parseArray("characters_character_planets_planet"; "pins"; B56) gives any meaningful data.

Blacksmoke16 commented 9 months ago

Right, =parseArray("characters_character_planets_planet"; "links"; B56) is only valid for links. If you want pins and routes you need to use that header name and point it at the cell that contains the related data. So like B57 and B58 assuming links are in B56.

mkocus commented 9 months ago

But how do I get the JSON with pins and routes? characters_character_planets_planet("{planet id here}"; "{char name here}") only gives json with links.

mkocus commented 9 months ago

OK, never mind :D I've just noticed that the result of characters_character_planets_planet expands into the 3 columns, but the spreadsheet overlaps the data, so I didn't noticed that earlier :)