Browse Source

rename dogapi.tag.delete to dogapi.tag.remove

pull/14/head
Brett Langdon 11 years ago
parent
commit
4051602e92
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      lib/api/tag.js

+ 6
- 6
lib/api/tag.js View File

@ -184,12 +184,12 @@ function update(hostname, tags, source, callback){
* app_key: "app_key" * app_key: "app_key"
* }; * };
* dogapi.initialize(options); * dogapi.initialize(options);
* dogapi.tag.delete("host.name", function(err, results){
* dogapi.tag.remove("host.name", function(err, results){
* console.dir(results); * console.dir(results);
* }); * });
* ``` * ```
*/ */
function delete_tags(hostname, source, callback){
function remove(hostname, source, callback){
if(arguments.length < 3 && typeof arguments[1] === "function"){ if(arguments.length < 3 && typeof arguments[1] === "function"){
callback = source; callback = source;
source = undefined; source = undefined;
@ -209,12 +209,12 @@ module.exports = {
get: get, get: get,
create: create, create: create,
update: update, update: update,
"delete": delete_tags,
remove: remove,
getUsage: function(){ getUsage: function(){
return [ return [
"${command} tag get_all [--source <source>]", "${command} tag get_all [--source <source>]",
"${command} tag get <host> [--source <source>] [--by-source]", "${command} tag get <host> [--source <source>] [--by-source]",
"${command} tag delete <host> [--source <source>]",
"${command} tag remove <host> [--source <source>]",
"${command} tag create <host> <tags> [--source <source>]", "${command} tag create <host> <tags> [--source <source>]",
"${command} tag update <host> <tags> [--source <source>]" "${command} tag update <host> <tags> [--source <source>]"
]; ];
@ -224,7 +224,7 @@ module.exports = {
"Tag Commands:", "Tag Commands:",
" get_all get all tags", " get_all get all tags",
" get <host> get all tags for a given host", " get <host> get all tags for a given host",
" delete <host> delete tags for a given host",
" remove <host> delete tags for a given host",
" create <host> <tags> add the comma separates \"tag:value\"'s from <tag> to <host>", " create <host> <tags> add the comma separates \"tag:value\"'s from <tag> to <host>",
" update <host> <tags> update the comma separates \"tag:value\"'s from <tag> to <host>", " update <host> <tags> update the comma separates \"tag:value\"'s from <tag> to <host>",
"", "",
@ -255,7 +255,7 @@ module.exports = {
var tags = args._[5].split(","); var tags = args._[5].split(",");
update(host, tags, source, callback); update(host, tags, source, callback);
} else if(subcommand === "delete"){ } else if(subcommand === "delete"){
delete_tags(host, source, callback);
remove(host, source, callback);
} }
} }
} }

Loading…
Cancel
Save