| 964 | return "Result(%s)" % dict.__repr__(self) |
| 965 | |
| 966 | class Results(list): |
| 967 | |
| 968 | def __init__(self, source=None, query=None, type=SEARCH, total=0): |
| 969 | """ A list of results returned from SearchEngine.search(). |
| 970 | - source: the service that yields the results (e.g. GOOGLE, TWITTER). |
| 971 | - query : the query that yields the results. |
| 972 | - type : the query type (SEARCH, IMAGE, NEWS). |
| 973 | - total : the total result count. |
| 974 | This is not the length of the list, but the total number of matches for the given query. |
| 975 | """ |
| 976 | self.source = source |
| 977 | self.query = query |
| 978 | self.type = type |
| 979 | self.total = total |
| 980 | |
| 981 | class SearchEngine(object): |
| 982 |
no outgoing calls
no test coverage detected
searching dependent graphs…