code: def edit_link(self, ticket_id, link_name, link_value, delete=False):
          
          valid_link_names = set(('dependson', 'dependedonby', 'refersto',
                                  'referredtoby', 'hasmember', 'memberof'))
          if not link_name.lower() in valid_link_names:
              raise InvalidUse("Unsupported name of link.")
          post_data = {'rel': link_name.lower(),
                       'to': link_value,
                       'id': ticket_id,
                       'del': 1 if delete else 0
                       }
          msg = self.__request('ticket/link', post_data=post_data)
          state = msg.split('\n')[2]
          if delete:
              return self.RE_PATTERNS['deleted_link_pattern'].match(state) is not None
          else:
              return self.RE_PATTERNS['created_link_pattern'].match(state) is not None
docs: Creates or deletes a link between the specified tickets (undocumented API feature).
  
          :param ticket_id: ID of ticket to edit
          :param link_name: Name of link to edit (DependsOn, DependedOnBy,
                            RefersTo, ReferredToBy, HasMember or MemberOf)
          :param link_value: Either ticker ID or external link.
          :param delete: if True the link is deleted instead of created
          :returns: ``True``
                        Operation was successful
                    ``False``
                        Ticket with given ID does not exist or link to delete is
                        not found
          :raises InvalidUse: When none or more then one links are specified. Also
                              when wrong link name is used.