Tag

Class: Tag

Version 1.6 - Updated on 03/23/2017

Contents

Constructor Details

#initialize(session) ⇒ Tag

————————————————- Tag functions —————————————–

def initialize(session)  
  # Instance variables  
  @session = session  
end

Instance Method Details

deleteTags

#deleteTags(uri, createVersion = 'false') ⇒ Object

Deletes a tag.

  • Arguments:

    • uri: Uri of tag
  • Returns:

    • A Hash object.
def deleteTags(uri,createVersion = 'false')
  params = {
    "uri" => uri,
    "createVersion" => createVersion
  }
  logger = Logger.new(STDOUT)
	logger.info params
  response = @session.do_delete_with_params "tags", params
  Sdk::parse_response(response, raw=true)
end

getTags

#getTags(path) ⇒ Object

Retrives tags.

  • Arguments:

    • path: Path of tags.
  • Returns:

    • A Hash object.
def getTags(path)
	path = URI.escape(path)
  response = @session.do_get_without_params "tags/"+path
  Sdk::parse_response(response,raw=true)
end

setTags

#setTags(tagdata) ⇒ Object

Updates tags.

  • Arguments:

    • tagdata: Share data in the json format.
  • Returns:

    • A Hash object.
def setTags(tagdata)
  params = tagdata
	
  headers = {'Content-Type' => 'application/json'}
  response = @session.do_put "tags", params, headers
  Sdk::parse_response(response)
end

Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.