def getTopicDistributionGivenQuery(self, query): params = interface_pb2.StringQueryParams() params.query = query params.offset = 0 params.count = 50 params.returned_fields.extend(returned_fields) method = "AuthorService_searchAuthors" response = request(self.endpoint, method, params) result = interface_pb2.Distribution.FromString(response.data) return result
def searchAuthors(self, query, returned_fields=["naid", "names", "email", "pub_count", "h_index"]): params = interface_pb2.StringQueryParams() params.query = query params.offset = 0 params.count = 50 params.returned_fields.extend(returned_fields) method = "AuthorService_searchAuthors" response = request(self.endpoint, method, params) result = interface_pb2.AuthorResult.FromString(response.data) return result
def searchPublications(self, query, returned_fields=["id", "title", "year", "conf_id", "jconf_name", "abs", "n_citations", "author_ids", "authors", "topic", "cite_pubs", "cited_by_pubs"]): params = interface_pb2.StringQueryParams() params.query = query params.offset = 0 params.count = 1000 params.returned_fields.extend(returned_fields) method = "PubService_searchPublications" response = request(self.endpoint, method, params) result = interface_pb2.PublicationResult.FromString(response.data) return result