obsidian-api-request
obsidian-api-request copied to clipboard
How to output multiple items without maketable?
Now that 2.0 doesn't have maketable any more, is there a way to output an array of items (preferably in a table, or at least just output them at all)?
Hello @orrd, could you give me an example? What is the structure response of your API?
I just mean for any situation where someone wants to display an array of items. In my particular case, I have price data for multiple years like this:
[
{
"Year": "2023",
"Price": 500,
"Paid": "500"
}, {
"Year": "2024",
"Price": 600,
"Paid": "600"
}
]
And I want to be able to output a table of price data for that client.
I was happy with the way maketable worked in the 1.x version of obsidian-api-request. I am also running into some other issues with 2.x (I was going to submit a separate ticket for at least one issue I'm having with how it handles cases where there is null/missing data in the API response). But for now I'm thinking about downgrading back to the 1.x version. I'm not sure yet how to best do that, but I'm wondering if it would make sense to offer a "classic" version of it in the Obsidian community plugins for now?
The code for maketable was a little messy... I have plans for re-implementing it in the future, but I'm not sure when.
For now if you really want to downgrade you can download any 1.x version and paste the 3 files (main.js, manifest.json and style.css) inside:
~/VAUL-PATH/.obsidian/plugins/api-request