Пример #1
0
	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
Пример #2
0
	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
Пример #3
0
	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
Пример #4
0
	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
Пример #5
0
	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
Пример #6
0
	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