Esempio n. 1
0
 def update_filter(self, filter):
     '''
     This method update changes associates with a filter.
     @param $filter Filter structure.
     '''
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.UPDATE_REQUEST, filter, 0, None)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_for_filter_based_requests())
Esempio n. 2
0
 def create_filter(self, filter):
     '''
     This method create a filter.
     @param $filter Filter structure.
     '''
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.CREATE_REQUEST, filter, 0, None)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_for_filter_based_requests())
Esempio n. 3
0
 def subscribe_public_filter(self, filter_id):
     '''
     With this method you can unsubscribe to filter.
     @param $filter_id id to filter you want unsubscribe.
     '''
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.SUBSCRIBE_REQUEST, None, 0, filter_id)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_dict_filter_for_content_based_requests())
Esempio n. 4
0
 def list_detected_apps(self, page,filter_id):
     '''
     @param $filter_id id to the filter.
     @return Json structure with the details of applications detected by the filter.
     '''
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.LIST_DETECTIONS_REQUEST, None, page, filter_id)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_dict_filter_for_content_based_requests())
Esempio n. 5
0
 def get_RSS_info(self, filter_id):
     '''
     This method get the RSS information of a filter.
     @param $filter_id id to filter you want get RSS information.
     '''
     result = ExternalApiFilterRequest( ExternalApiFilterRequest.GET_RSS_REQUEST, None, None, filter_id)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_dict_filter_for_content_based_requests())
Esempio n. 6
0
 def get_group_RSS_info(self, groupName):
     '''
     This method get the RSS information of a filters group.
     @param $groupName name of the filters group you want get RSS information.
     '''
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.GET_GROUP_RSS, None, None, groupName)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_dict_filter_for_content_based_requests())
Esempio n. 7
0
 def read_one_filter(self, filter_id):
     '''
     @param $filter_id id of the filter you want to read.
     @return This method returns the details of filter associate with this filter_id.
     '''
     filter = Filter(filter_id)
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.READ_REQUEST, filter, 0, None)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_for_filter_based_requests())
Esempio n. 8
0
 def delete_filter(self, filter_id):
     '''
  	This method delete a filter create.
     @param $filter_id id of the filter you want to delete.
     '''
     filter = Filter(filter_id)
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.DELETE_REQUEST, filter, 0, None)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_for_filter_based_requests())
Esempio n. 9
0
 def search_public_filter(self, query, page):
     '''
     @param $query any word or phrase within the description or title Filter
     @param $page A number greater or equal to 1 indicating the page of results which have to be retrieved.
     @return A list of public filters(Visibility = Public)
     '''
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.SEARCH_PUBLIC_FILTER_REQUEST, None, page, query)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_dict_filter_for_content_based_requests())
Esempio n. 10
0
 def list_group_detected_apps(self, page, groupName):
     '''
     @param $groupName name of the group.
     @param $page A number greater or equal to 1 indicating the page of results which have to be retrieved.
     @return Json structure with the details of applications detected by the filters group.
     '''
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.LIST_GROUP_DETECTIONS, None, page, groupName)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_dict_filter_for_content_based_requests())
Esempio n. 11
0
 def read_all_filters(self):
     '''
     @return a list of filters creates.
     '''
     result = ExternalApiFilterRequest(
         ExternalApiFilterRequest.READ_REQUEST, None, 0, None)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_for_filter_based_requests())
Esempio n. 12
0
 def read_group_filters(self):
     '''
     @return all group filters created
     '''
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.READ_GROUPS,
                                       None, 0, None)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_for_filter_based_requests())
Esempio n. 13
0
 def update_filter(self, filter):
     '''
     This method update changes associates with a filter.
     @param $filter Filter structure.
     '''
     result = ExternalApiFilterRequest(
         ExternalApiFilterRequest.UPDATE_REQUEST, filter, 0, None)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_for_filter_based_requests())
Esempio n. 14
0
 def create_filter(self, filter):
     '''
     This method create a filter.
     @param $filter Filter structure.
     '''
     result = ExternalApiFilterRequest(
         ExternalApiFilterRequest.CREATE_REQUEST, filter, 0, None)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_for_filter_based_requests())
Esempio n. 15
0
 def delete_filter(self, filter_id):
     '''
  	This method delete a filter create.
     @param $filter_id id of the filter you want to delete.
     '''
     filter = Filter(filter_id)
     result = ExternalApiFilterRequest(
         ExternalApiFilterRequest.DELETE_REQUEST, filter, 0, None)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_for_filter_based_requests())
Esempio n. 16
0
 def read_one_filter(self, filter_id):
     '''
     @param $filter_id id of the filter you want to read.
     @return This method returns the details of filter associate with this filter_id.
     '''
     filter = Filter(filter_id)
     result = ExternalApiFilterRequest(
         ExternalApiFilterRequest.READ_REQUEST, filter, 0, None)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_for_filter_based_requests())
Esempio n. 17
0
 def subscribe_public_filter(self, filter_id):
     '''
     With this method you can unsubscribe to filter.
     @param $filter_id id to filter you want unsubscribe.
     '''
     result = ExternalApiFilterRequest(
         ExternalApiFilterRequest.SUBSCRIBE_REQUEST, None, 0, filter_id)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_dict_filter_for_content_based_requests(
         ))
Esempio n. 18
0
 def get_RSS_info(self, filter_id):
     '''
     This method get the RSS information of a filter.
     @param $filter_id id to filter you want get RSS information.
     '''
     result = ExternalApiFilterRequest(
         ExternalApiFilterRequest.GET_RSS_REQUEST, None, None, filter_id)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_dict_filter_for_content_based_requests(
         ))
Esempio n. 19
0
 def get_group_RSS_info(self, groupName):
     '''
     This method get the RSS information of a filters group.
     @param $groupName name of the filters group you want get RSS information.
     '''
     result = ExternalApiFilterRequest(
         ExternalApiFilterRequest.GET_GROUP_RSS, None, None, groupName)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_dict_filter_for_content_based_requests(
         ))
Esempio n. 20
0
 def list_detected_apps(self, page, filter_id):
     '''
     @param $filter_id id to the filter.
     @return Json structure with the details of applications detected by the filter.
     '''
     result = ExternalApiFilterRequest(
         ExternalApiFilterRequest.LIST_DETECTIONS_REQUEST, None, page,
         filter_id)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_dict_filter_for_content_based_requests(
         ))
Esempio n. 21
0
 def search_public_filter(self, query, page):
     '''
     @param $query any word or phrase within the description or title Filter
     @param $page A number greater or equal to 1 indicating the page of results which have to be retrieved.
     @return A list of public filters(Visibility = Public)
     '''
     result = ExternalApiFilterRequest(
         ExternalApiFilterRequest.SEARCH_PUBLIC_FILTER_REQUEST, None, page,
         query)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_dict_filter_for_content_based_requests(
         ))
Esempio n. 22
0
 def list_group_detected_apps(self, page, groupName):
     '''
     @param $groupName name of the group.
     @param $page A number greater or equal to 1 indicating the page of results which have to be retrieved.
     @return Json structure with the details of applications detected by the filters group.
     '''
     result = ExternalApiFilterRequest(
         ExternalApiFilterRequest.LIST_GROUP_DETECTIONS, None, page,
         groupName)
     return self.http_post(
         self.API_FILTERS_URL,
         None,
         body=result.get_json_encode_dict_filter_for_content_based_requests(
         ))
Esempio n. 23
0
 def read_group_filters(self):
     '''
     @return all group filters created
     '''
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.READ_GROUPS, None, 0, None)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_for_filter_based_requests())
Esempio n. 24
0
 def read_all_filters(self):
     '''
     @return a list of filters creates.
     '''
     result = ExternalApiFilterRequest(ExternalApiFilterRequest.READ_REQUEST, None, 0, None)
     return self.http_post(self.API_FILTERS_URL, None, body=result.get_json_encode_for_filter_based_requests())