TemplateAPI.md in consul-templaterb-1.17.4 vs TemplateAPI.md in consul-templaterb-1.18.0

- old
+ new

@@ -432,9 +432,22 @@ ``` </div> </details> +## remote_resource + +### as_json(url, default_value, [refresh_delay_secs: intInSecond]) + +Fetch json data from any url. This allows to create templates with consul/vault data mixed in with data coming from other services/api. +Polling interval can be controlled with refresh_delay_secs. + +```erb +remote_resource.as_json('http://my-api.dev/fridge/list.json', []) +``` + +Full example: [samples/list_ruby_versions_from_rubygems.txt.erb](samples/list_ruby_versions_from_rubygems.txt.erb) + ## template_info() It returns information about current template being rendered. The information returned has the following structure: