Exemple #1
0
 def influence_search_by_author(self, dataset, aid):
     r = interface_pb2.EntitySearchRequest()
     r.dataset = dataset
     r.query = str(aid)
     response = pbrequest(self.endpoint, "InfluenceSearchByAuthor", r)
     er = interface_pb2.InfluenceSearchResponse()
     er.ParseFromString(response)
     return er
Exemple #2
0
 def _entity_search(self, method, query, offset, count):
     r = interface_pb2.EntitySearchRequest()
     r.dataset = ""
     r.query = query
     r.offset = offset
     r.count = count
     response = pbrequest(self.endpoint, method, r)
     er = interface_pb2.EntitySearchResponse()
     er.ParseFromString(response)
     return er
Exemple #3
0
 def pub_search(self, dataset, query, offset=0, count=20):
     r = interface_pb2.EntitySearchRequest()
     r.dataset = dataset
     r.query = query
     r.offset = offset
     r.count = count
     response = pbrequest(self.endpoint, "PubSearch", r)
     er = interface_pb2.EntitySearchResponse()
     er.ParseFromString(response)
     return er
Exemple #4
0
 def pub_search_by_author(self, dataset, author_id, offset=0, count=20):
     r = interface_pb2.EntitySearchRequest()
     r.dataset = dataset
     r.query = str(author_id)
     r.offset = offset
     r.count = count
     response = pbrequest(self.endpoint, "PubSearchByAuthor", r)
     er = interface_pb2.EntitySearchResponse()
     er.ParseFromString(response)
     return er
Exemple #5
0
 def jconf_search(self, dataset, query, offset=0, count=20):
     r = interface_pb2.EntitySearchRequest()
     r.dataset = dataset
     r.query = query
     r.offset = offset
     r.count = count
     response = pbrequest(self.endpoint, "JConfSearch", r)
     er = interface_pb2.EntitySearchResponse()
     er.query = query
     er.total_count = 0
     return er