I have read this thread that is related to what I am looking for and I have several questions:
- some json sources return actual image urls. for exmple:
is there a way to point the media tile to the image inside the json result? in the thread I mentioned there was usage of an iagee generation URL with Query parameter to retrieve the data from the json and then convert the texto image but in this case the text is a link to the image.
- in some cases I will want to display combined formatted text (image text image) in the tile.
for example the following json:
in this case I would like to conbine all 3 value to 1 tile that will show something like:
any suggestions for both issues?
You would likely need some external service to parse the JSON and transform it into the desired output format.
JSON with Media URL
For the JSON source that returns an image URL, if you could find something that could parse the JSON and then redirect to the desired URL, then you could use that as your Media Tile URL.
I can’t think of anything out of the box that will do that, but if you have some programming skills, you could write a script to do it.
Similar to above, you would need an external service to combine the strings together and then return the concatenated text.
Do you control the sources that are generating this data? Or could you provide some sample URLs?
Edit: Feel free to PM me the URLs if they include sensitive info like private API Keys.
Thanks Josh. I have some control over the data. And I also consider myself to have good programing skills.
I will dive a little more and see what I can do.
Sounds good. If you need some help, feel free to PM me the sources and I’d be happy to help put a proof of concept together for you.
For your image example, here’s a demo I put together using Node.js on Glitch using an API from the Cocktail DB.
The project queries the Cocktail DB API for ‘Margarita’, grabs the image URL in the first result, then redirects you to the image.
You can then use the Live App URL from Glitch directly in your SharpTools Media Tile:
yep, code is very clear. I dont have node js in my toolbelt but I do have some JS and I have been working with libraries such as axios in the past so no issues understanding whats going on