Add one or more tags to this object.

 call-seq: add_tags(Hash) -> OsmObject
973158
def add_tags(new_tags)
      case new_tags
      when Array # Called with an array
        # Call recursively for each entry
        new_tags.each do |tag_hash|
          add_tags(tag_hash)
        end
      when Hash # Called with a hash
        #check if it is weird {'k' => 'key', 'v' => 'value'} syntax
        if (new_tags.size == 2 && new_tags.keys.include?('k') && new_tags.keys.include?('v'))
          # call recursively with values from k and v keys.
          add_tags({new_tags['k'] => new_tags['v']})
        else
          # OK, this seems to be a proper ruby hash with a single entry
          new_tags.each do |k,v|
            self.tags[k] = v
          end
        end
      end
      self    # return self so calls can be chained
    end
276555
def tag(self, tags):
        
        # Get tag list and add/remove given tags
        tags = tags.lower()
        previous = self.tagged
        tagset = previous.copy()
        for tag in tags.replace(',', ' ').split():
            if tag.startswith('-'):
                tagset.discard(tag[1:])
            elif tag.startswith('+'):
                tagset.add(tag[1:])
            else:
                tagset.add(tag)

        # Write back new tagset, if changed
        tagset.discard('')
        if tagset != previous:
            tagset = ' '.join(sorted(tagset))
            self._make_it_so("setting tags %r on" % (tagset,), ["custom.set"], "tags", tagset)
            self._fields["custom_tags"] = tagset
580451
def add_tag_before(tag_name, tag_text, parent_tag, before_tag_name):
    
    new_tag = Element(tag_name)
    new_tag.text = tag_text
    if get_first_element_index(parent_tag, before_tag_name):
        parent_tag.insert( get_first_element_index(parent_tag, before_tag_name) - 1, new_tag)
    return parent_tag
536695
def job_add_tags(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/addTags' % object_id, input_params, always_retry=always_retry, **kwargs)
706033
function addChildTag(tag, tagName, parent) {
  var cachedTag = parent.tags[tagName]

  // if there are multiple children tags having the same name
  if (cachedTag) {
    // if the parent tags property is not yet an array
    // create it adding the first cached tag
    if (!isArray(cachedTag))
      // don't add the same tag twice
      if (cachedTag !== tag)
        parent.tags[tagName] = [cachedTag]
    // add the new nested tag to the array
    if (!contains(parent.tags[tagName], tag))
      parent.tags[tagName].push(tag)
  } else {
    parent.tags[tagName] = tag
  }
}
1282341
def add_tags(self, dic, prefix):
        
        # fill missing tagvalues with "?", raise an error for unknown tagnames
        idxs = []
        for tagname in self.tagnames:
            if tagname in ('exposure', 'country'):
                idxs.append(self.add(tagname, prefix))
                continue
            try:
                tagvalue = dic.pop(tagname)
            except KeyError:
                tagvalue = '?'
            else:
                if tagvalue in '?*':
                    raise ValueError(
                        'Invalid tagvalue="%s"' % tagvalue)
            idxs.append(self.add(tagname, tagvalue))
        if dic:
            raise ValueError(
                'Unknown tagname %s or <tagNames> not '
                'specified in the exposure' % ', '.join(dic))
        return idxs
494384
def add_tag(context, id, name):
    

    result = job.add_tag(context, id=id, name=name)
    utils.format_output(result, context.format)
389122
def _add_tags(self, tags):
        # type: (List[str]) -> bool
        
        alltagsadded = True
        for tag in tags:
            if not self._add_tag(tag):
                alltagsadded = False
        return alltagsadded
539371
def tag_add_devices(tag,channel_ids)
			set_resource_and_method(__method__)
			@params = {tag:tag,channel_ids:channel_ids.to_json}
			send_request
		end
269926
def add_tags(self, tags, **kwargs):
        
        if self._dxid is not None:
            return dxpy.api.app_add_tags(self._dxid, input_params={"tags": tags}, **kwargs)
        else:
            return dxpy.api.app_add_tags('app-' + self._name, alias=self._alias,
                                         input_params={"tags": tags}, **kwargs)
653552
public T withTags(Iterable<Tag> tags) {
    for (Tag t : tags) {
      extraTags.add(t);
    }
    return (T) this;
  }
57071
async def addNodeTag(self, iden, tag, valu=(None, None)):
        '''
        
        '''
        buid = s_common.uhex(iden)

        parts = tag.split('.')
        self._reqUserAllowed('tag:add', *parts)

        async with await self.cell.snap(user=self.user) as snap:
            with s_provenance.claim('coreapi', meth='tag:add', user=snap.user.iden):

                node = await snap.getNodeByBuid(buid)
                if node is None:
                    raise s_exc.NoSuchIden(iden=iden)

                await node.addTag(tag, valu=valu)
                return node.pack()
837686
public void addTags(String photoId, String[] tags) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_ADD_TAGS);

        parameters.put("photo_id", photoId);
        parameters.put("tags", StringUtilities.join(tags, " ", true));

        Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
    }
494433
def add_tag(self, tag, value):
        
        index = bisect_left(self.tags, (tag, value))
        contains = False
        if index < len(self.tags):
            contains = self.tags[index] == (tag, value)
        if not contains:
            self.tags.insert(index, (tag, value))
814090
def add_tag(tag)
      if @counters[:attributes][:tag] >= Mailgun::Chains::MAX_TAGS
        fail Mailgun::ParameterError, 'Too many tags added to message.', tag
      end
      set_multi_complex('o:tag', tag)
      @counters[:attributes][:tag] += 1
    end
589437
def add_tags(jobflow_id, tags)
      params = {
        :operation => 'AddTags',
        :resource_id => jobflow_id,
        :tags => tags
      }
      aws_result = @aws_request.submit(params)
      yield aws_result if block_given?
    end
1273213
public void addTag(String tag) {
        if (this.tags == null) {
            tags = new ArrayList<String>();
        }
        this.tags.add(tag);
    }