updateTemplate method
Updates a Transloadit template from a templateID
merge
is still being implemented (does nothing currently)
Implementation
Future<TransloaditResponse> updateTemplate(
{required String templateID,
required Map<String, dynamic> template,
Map<String, dynamic>? params,
bool merge = false}) async {
params = params ?? {};
Map<String, dynamic> templateCopy = {};
templateCopy["steps"] = template;
params["template"] = templateCopy;
// TODO: Implement instruction merging
// if (merge) {
// Map<String, dynamic> currentInstructions = {};
// _getCurrentInstructions(templateID)
// .then((value) => currentInstructions = value);
// for (var key in template.keys) {}
// print(currentInstructions);
// }
final response = await request.httpPut(
service: service,
assemblyPath: "/templates/$templateID",
params: params);
return response;
}