• Mapping data from Json returning URL.

    2
    0 Votes
    2 Posts
    733 Views
    @oms The structure of the data returned is not readable by Templater. You need to have it respond to your request as an array of objects. Inside the objects, you cannot have nested objects either. You actually can, but Templater will ignore it. So for example your structure now is this: { "data": { "id":2, "name":"fuchsia rose", "year":2001, "color":"#C74375", "pantone_value":"17-2031" }, "support": { "url":"https://reqres.in/#support-heading", "text":"To keep ReqRes free, contributions towards server costs are appreciated!" } } But really it needs to be an array, and it needs to be “flat” objects inside that array. So it would be best to do: [ { "id" : 2, "name" : "fuchsia rose", "year" : 2001, "color" : "#C74375", "pantone_value" : "17-2031", "url" : "https://reqres.in/#support-heading", "text" : "To keep ReqRes free, contributions towards server costs are appreciated!" } ] Note how the singular object is still within an array [ ]. Also note that there are no nested objects in that singular object in the array. Does this help?
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • Authorise URL feed with API access token via Shell Script

    2
    0 Votes
    2 Posts
    719 Views
    Hey Ronan, You have the ability to write a shell script on the “Pre-Data” event. See event [ 2a ] in our table of events that Templater broadcasts. In that script, you can run any commands needed to retrieve an API access token. Does this help? For remote URL data sources, Templater supports Basic Authentication at the moment. How are you expecting to use the API access token once you retrieve it? Are you wanting to send it with request Templater makes? If so, I’m not sure that’s possible out of the box even with scripting. However, you should be able to get the API token via a shell script by registering it to the “Pre-Data” event. Thanks, Arie
  • 0 Votes
    4 Posts
    792 Views
    It should work, yes. Keep in mind that when you use the CLI, it’s essentially a synchronous process because you cannot execute more than one AE instance at any given time. If that is not an issue, then it will work perfectly. However if you plan on having concurrent CLI calls, then you might consider using the CLI to “Enable Bot” and have Bot “watch” the data source. If your data object contains a “render-status” property and it’s set to “ready” then Templater will process that job. In this way, you can have you app keep writing to the data.json file with new objects and then Templater will just pick them up. There is another forum post that describes the different deployment techniques. Take a read through that one and see if it helps you understand the broader methods for architecting your solution. Thanks, Arie
  • Min 1 Minute interval between scans if data source

    15
    0 Votes
    15 Posts
    2k Views
    @ariestav Any update on the bug? EDIT: It’s now becoming a bigger and bigger issue. It now hangs for about 2 minutes when pulling in data from the JSON source. It is getting to the point where we are looking at no longer using templater bot, as we haven’t had any indication this will be fixed.