def deleteEntry(self, identifier): with grpc.insecure_channel("localhost:50051") as channel: stub = pb2_grpc.MDRankingServiceStub(channel) resp = stub.deleteEntry(pb2.identifier(identifier=identifier)) output = resp.status return output
def batch(self, diff): with grpc.insecure_channel("localhost:50051") as channel: stub = pb2_grpc.MDRankingServiceStub(channel) resp = stub.batch(pb2.diff(diff=diff)) output = resp.status return output
def feedback(self, data): with grpc.insecure_channel("localhost:50051") as channel: stub = pb2_grpc.MDRankingServiceStub(channel) resp = stub.feedback(pb2.status(status=data)) output = resp.status return output
def increaseClick(self, identifier, event="mapclick"): with grpc.insecure_channel("localhost:50051") as channel: stub = pb2_grpc.MDRankingServiceStub(channel) resp = stub.increaseClick(pb2.click(identifier=identifier, event=event)) output = resp.status return output
def addEntry(self, identifier, long, lat): with grpc.insecure_channel("localhost:50051") as channel: stub = pb2_grpc.MDRankingServiceStub(channel) resp = stub.addEntry(pb2.entry(identifier=identifier, longitude=int(long), latitude=int(lat))) output = resp.status return output
def getIdents(self, identifiers, curzoom, minzoom=17): with grpc.insecure_channel("localhost:50051") as channel: stub = pb2_grpc.MDRankingServiceStub(channel) resp = stub.getIdents(pb2.identifiers(identifiers=identifiers, curzoom=curzoom, minzoom=minzoom)) output = resp.identifiersOut return output