Ejemplo n.º 1
0
 def delete_tag(self, tag):
     '''
     This method delete a tag.
     @param $tag the name of the tag you want to delete.
     '''
     result = ExternalApiTagRequest(ExternalApiTagRequest.REMOVE_ALL_REQUEST, tag, None)
     return self.http_post(self.API_TAGS_URL, None, body=result.get_json_encode_dict_for_tag_based_requests())
Ejemplo n.º 2
0
    def remove_tag_for_apps(self, tag, app_keys):
        '''
		This method remove a tag associate with applications.
        @param $tag the name of the tag to create
        @param $app_keys Key applications that want to remove with the tag
        '''
        result = ExternalApiTagRequest(ExternalApiTagRequest.REMOVE_REQUEST, tag, app_keys)
        return self.http_post(self.API_TAGS_URL, None, body=result.get_json_encode_dict_for_tag_based_requests())
Ejemplo n.º 3
0
    def assign_tag(self, tag, app_keys):
        '''
		This method associates a tag created with applications.
        @param $tag the name of the tag to create
        @param $app_keys Key applications that want to associate with the tag
        @return A list of applications associates with a tag.
        '''
        result = ExternalApiTagRequest(ExternalApiTagRequest.CREATE_REQUEST, tag, app_keys)
        return self.http_post(self.API_TAGS_URL, None, body=result.get_json_encode_dict_for_tag_based_requests())
Ejemplo n.º 4
0
 def list_tags(self):
     '''
     @return A list of tags that have been created.
     '''
     result = ExternalApiTagRequest(ExternalApiTagRequest.LIST_REQUEST,
                                    None, None)
     return self.http_post(
         self.API_TAGS_URL,
         None,
         body=result.get_json_encode_dict_for_tag_based_requests())
Ejemplo n.º 5
0
 def delete_tag(self, tag):
     '''
     This method delete a tag.
     @param $tag the name of the tag you want to delete.
     '''
     result = ExternalApiTagRequest(
         ExternalApiTagRequest.REMOVE_ALL_REQUEST, tag, None)
     return self.http_post(
         self.API_TAGS_URL,
         None,
         body=result.get_json_encode_dict_for_tag_based_requests())
Ejemplo n.º 6
0
    def remove_tag_for_apps(self, tag, app_keys):
        '''
		This method remove a tag associate with applications.
        @param $tag the name of the tag to create
        @param $app_keys Key applications that want to remove with the tag
        '''
        result = ExternalApiTagRequest(ExternalApiTagRequest.REMOVE_REQUEST,
                                       tag, app_keys)
        return self.http_post(
            self.API_TAGS_URL,
            None,
            body=result.get_json_encode_dict_for_tag_based_requests())
Ejemplo n.º 7
0
    def assign_tag(self, tag, app_keys):
        '''
		This method associates a tag created with applications.
        @param $tag the name of the tag to create
        @param $app_keys Key applications that want to associate with the tag
        @return A list of applications associates with a tag.
        '''
        result = ExternalApiTagRequest(ExternalApiTagRequest.CREATE_REQUEST,
                                       tag, app_keys)
        return self.http_post(
            self.API_TAGS_URL,
            None,
            body=result.get_json_encode_dict_for_tag_based_requests())
Ejemplo n.º 8
0
 def list_tags(self):
     '''
     @return A list of tags that have been created.
     '''
     result = ExternalApiTagRequest(ExternalApiTagRequest.LIST_REQUEST, None, None)
     return self.http_post(self.API_TAGS_URL, None, body=result.get_json_encode_dict_for_tag_based_requests())