I am trying to help someone automatically populate some information into a card each morning. Since a HTTP API is available to fetch the data as a JSON, it seems we should be using Butler:
https://help.trello.com/article/1203-issuing-http-requests-with-butler
The example provided helped to get a proof of concept working, but it only shows how to display a specific result
First result: {httpresponse.relatedMovies[0].title}The data I am requesting may return any number of results, from 0 to 30, so listing each is not practical and would result in 'undefined' being displayed if results were not available; following the example, perhaps you want to return the list of all the movie titles that are related with no limit; the below is not ideal:
First result: {httpresponse.relatedMovies[0].title}
Second result: {httpresponse.relatedMovies[1].title}
Third result: {httpresponse.relatedMovies[2].title}
Fourth result: {httpresponse.relatedMovies[3].title}
...I assume there is some wildcard or the ability to do a for loop of some sort?
for {let n = 0; n < httpresponse.relatedMovies.length; n++}
{
{httpresponse.relatedMovies[n].title}
}Any help appreciated. I had a decent search through the documentation and forum and didn't find anything related. Perhaps we need to move to the Power Ups to get this sort of functionality?
The above considers a JSON like in the example on the link
{
relatedMovies:[
{title: 'Movie 1'},
{title: 'Movie 2'},
{title: 'Movie 3'},
{title: 'Movie 4'},
],
};