sysomos.py
def top_sources(self,query,startDate=None,endDate=None,size=None,sampleSize=None,authorityLevel=None):
        
        """
        Performs search for top sources based on query
        
        :param query: The text string on which to search
        :type query: string
        
        :param startDate: Restrict results to a date range, required if endDate is specfied. Valid format is YYYY-MM-DD
        :type startDate: string
        
        :param endDate: Restrict results to a date range, required if startDate is specfied. Valid format is YYYY-MM-DD
        :type endDate: string
        
        :param size: The number of items per page. Maximum value is 50,000. Default=10
        :type size: int
        
        :param sampleSize: The number of documents to analyze the top sources list. If not specified, default value is 10,000.
        :type sampleSize: int
        
        :param authorityLevel: The cut-off point for authority level. Default value is 5.
        :type authorityLevel: int
        
        """
   
        params = _params(startDate=startDate,endDate=endDate,size=size)
        
        if sampleSize:
            params['sampleSize'] = sampleSize
        if authorityLevel:
            params['authorityLevel'] = authorityLevel
   
        try:
            search_url = self.base_url + '/top_sources' + '?apiKey=' + self.api_key + '&q=' + query + "&" + "&".join(["%s=%s" %(k,v) for (k,v) in params.items()])
        except AttributeError:
            search_url = self.base_url + '/top_sources' + '?apiKey=' + self.api_key + '&q=' + query
        
        response_data = requests.get(search_url,headers=self.headers)
        results = response_data.json()
        
        return results

        Performs search for top sources based on query
        
        :param query: The text string on which to search
        :type query: string
        
        :param startDate: Restrict results to a date range, required if endDate is specfied. Valid format is YYYY-MM-DD
        :type startDate: string
        
        :param endDate: Restrict results to a date range, required if startDate is specfied. Valid format is YYYY-MM-DD
        :type endDate: string
        
        :param size: The number of items per page. Maximum value is 50,000. Default=10
        :type size: int
        
        :param sampleSize: The number of documents to analyze the top sources list. If not specified, default value is 10,000.
        :type sampleSize: int
        
        :param authorityLevel: The cut-off point for authority level. Default value is 5.
        :type authorityLevel: int
        
        
Performs search for top sources based on query
Performs search for top sources based on query
def top_sources(self,query,startDate=None,endDate=None,size=None,sampleSize=None,authorityLevel=None):
        params = _params(startDate=startDate,endDate=endDate,size=size)
        if sampleSize:
            params['sampleSize'] = sampleSize
        if authorityLevel:
            params['authorityLevel'] = authorityLevel
        try:
            search_url = self.base_url + '/top_sources' + '?apiKey=' + self.api_key + '&q=' + query + "&" + "&".join(["%s=%s" %(k,v) for (k,v) in params.items()])
        except AttributeError:
            search_url = self.base_url + '/top_sources' + '?apiKey=' + self.api_key + '&q=' + query
        response_data = requests.get(search_url,headers=self.headers)
        results = response_data.json()
        return results
def top_sources ( self , query , startDate = None , endDate = None , size = None , sampleSize = None , authorityLevel = None ) : params = _params ( startDate = startDate , endDate = endDate , size = size ) if sampleSize : params [ 'sampleSize' ] = sampleSize if authorityLevel : params [ 'authorityLevel' ] = authorityLevel try : search_url = self . base_url + '/top_sources' + '?apiKey=' + self . api_key + '&q=' + query + "&" + "&" . join ( [ "%s=%s" % ( k , v ) for ( k , v ) in params . items ( ) ] ) except AttributeError : search_url = self . base_url + '/top_sources' + '?apiKey=' + self . api_key + '&q=' + query response_data = requests . get ( search_url , headers = self . headers ) results = response_data . json ( ) return results
Performs search for top sources based on query
Performs search for top sources based on query
"""
        Performs search for top sources based on query
        
        :param query: The text string on which to search
        :type query: string
        
        :param startDate: Restrict results to a date range, required if endDate is specfied. Valid format is YYYY-MM-DD
        :type startDate: string
        
        :param endDate: Restrict results to a date range, required if startDate is specfied. Valid format is YYYY-MM-DD
        :type endDate: string
        
        :param size: The number of items per page. Maximum value is 50,000. Default=10
        :type size: int
        
        :param sampleSize: The number of documents to analyze the top sources list. If not specified, default value is 10,000.
        :type sampleSize: int
        
        :param authorityLevel: The cut-off point for authority level. Default value is 5.
        :type authorityLevel: int
        
        """
self
query
The text string on which to search
The text string on which to search
startDate
Restrict results to a date range, required if endDate is specfied. Valid format is YYYY-MM-DD
Restrict results to a date range required if endDate is specfied . Valid format is YYYY - MM - DD
endDate
Restrict results to a date range, required if startDate is specfied. Valid format is YYYY-MM-DD
Restrict results to a date range required if startDate is specfied . Valid format is YYYY - MM - DD
size
The number of items per page. Maximum value is 50,000. Default=10
The number of items per page . Maximum value is 50 000 . Default = 10
sampleSize
The number of documents to analyze the top sources list. If not specified, default value is 10,000.
The number of documents to analyze the top sources list . If not specified default value is 10 000 .
authorityLevel
The cut-off point for authority level. Default value is 5.
The cut - off point for authority level . Default value is 5 .