cytaxii.py
def poll_request(self, collection_id, added_after=None, object_id=None, object_type=None,
                     start_range=None, end_range=None):
        """
        This method is used to poll data from a particular collection
        :param object_type: Enter the indicator type to retrieve
        :param start_range: Enter the start range of items to receive. 0 based
        :param object_id: Enter a specific object to retrieve
        :param end_range: Enter the end range of items to receive. 0 based
        :param added_after: Enter the date to poll from, polls all data if left blank
        :param collection_id: Enter the collection ID
        """
        if not start_range:
            start_range = 0
        if not end_range:
            end_range = 100
        range = "items {0}-{1}".format(start_range, end_range)
        self.headers["Range"] = range

        discover_response = self.discovery_request()
        params = {
            'added_after': added_after,
            'match[id]': object_id,
            'match[type]': object_type
        }
        if discover_response['status_code'] == 200:
            api_root = discover_response['response']['default']
            api_root = api_root.rstrip('/')
            poll_url = "{0}/{1}/{2}/{3}/".format(api_root, "collections", collection_id, "objects")
            response = self.request_handler(method='GET', url=poll_url, query_params=params)
            return response
        else:
            return discover_response

        This method is used to poll data from a particular collection
        :param object_type: Enter the indicator type to retrieve
        :param start_range: Enter the start range of items to receive. 0 based
        :param object_id: Enter a specific object to retrieve
        :param end_range: Enter the end range of items to receive. 0 based
        :param added_after: Enter the date to poll from, polls all data if left blank
        :param collection_id: Enter the collection ID
        
This method is used to poll data from a particular collection
This method is used to poll data from a particular collection
def poll_request(self, collection_id, added_after=None, object_id=None, object_type=None,
                     start_range=None, end_range=None):
        if not start_range:
            start_range = 0
        if not end_range:
            end_range = 100
        range = "items {0}-{1}".format(start_range, end_range)
        self.headers["Range"] = range
        discover_response = self.discovery_request()
        params = {
            'added_after': added_after,
            'match[id]': object_id,
            'match[type]': object_type
        }
        if discover_response['status_code'] == 200:
            api_root = discover_response['response']['default']
            api_root = api_root.rstrip('/')
            poll_url = "{0}/{1}/{2}/{3}/".format(api_root, "collections", collection_id, "objects")
            response = self.request_handler(method='GET', url=poll_url, query_params=params)
            return response
        else:
            return discover_response
def poll_request ( self , collection_id , added_after = None , object_id = None , object_type = None , start_range = None , end_range = None ) : if not start_range : start_range = 0 if not end_range : end_range = 100 range = "items {0}-{1}" . format ( start_range , end_range ) self . headers [ "Range" ] = range discover_response = self . discovery_request ( ) params = { 'added_after' : added_after , 'match[id]' : object_id , 'match[type]' : object_type } if discover_response [ 'status_code' ] == 200 : api_root = discover_response [ 'response' ] [ 'default' ] api_root = api_root . rstrip ( '/' ) poll_url = "{0}/{1}/{2}/{3}/" . format ( api_root , "collections" , collection_id , "objects" ) response = self . request_handler ( method = 'GET' , url = poll_url , query_params = params ) return response else : return discover_response
This method is used to poll data from a particular collection
This method is used to poll data from a particular collection
"""
        This method is used to poll data from a particular collection
        :param object_type: Enter the indicator type to retrieve
        :param start_range: Enter the start range of items to receive. 0 based
        :param object_id: Enter a specific object to retrieve
        :param end_range: Enter the end range of items to receive. 0 based
        :param added_after: Enter the date to poll from, polls all data if left blank
        :param collection_id: Enter the collection ID
        """
self
collection_id
Enter the collection ID
Enter the collection ID
added_after
Enter the date to poll from, polls all data if left blank
Enter the date to poll from polls all data if left blank
object_id
Enter a specific object to retrieve
Enter a specific object to retrieve
object_type
Enter the indicator type to retrieve
Enter the indicator type to retrieve
start_range
Enter the start range of items to receive. 0 based
Enter the start range of items to receive . 0 based
end_range
Enter the end range of items to receive. 0 based
Enter the end range of items to receive . 0 based