(byKey, value, callback, options = {})
| 433 | }; |
| 434 | |
| 435 | function publishResource(byKey, value, callback, options = {}) { |
| 436 | let params, resource_type, uri; |
| 437 | params = pickOnlyExistingValues(options, "type", "invalidate", "overwrite"); |
| 438 | params[byKey] = value; |
| 439 | resource_type = options.resource_type || "image"; |
| 440 | uri = ["resources", resource_type, "publish_resources"]; |
| 441 | options = extend({ |
| 442 | resource_type: resource_type |
| 443 | }, options); |
| 444 | return call_api("post", uri, params, callback, options); |
| 445 | } |
| 446 | |
| 447 | exports.publish_by_prefix = function publish_by_prefix(prefix, callback, options = {}) { |
| 448 | return publishResource("prefix", prefix, callback, options); |
no test coverage detected