Skip to content
Snippets Groups Projects
Commit 52b971ab authored by Callum Inglis's avatar Callum Inglis
Browse files

Change response.gateway to response.gatewayMetadata

parent de2c31db
No related branches found
No related tags found
3 merge requests!4Api authentication,!3Api authentication,!2Api authentication
This commit is part of merge request !4. Comments created here will be created in the context of that merge request.
......@@ -48,7 +48,7 @@ import SX127x.packer as packer
import secrets
DEBUG = 1
DEBUG = 2
API_URL = "https://emiei.4oh4.co/api"
MAX_TX_RESERVATION_TIME = 2 # Seconds
......@@ -74,7 +74,7 @@ class RxHello(object):
class SensorResponse(object):
def __init__(self, sensorMetadata, data):
self.gateway = Gateway()
self.gatewayMetadata = GatewayMetadata()
self.sensorMetadata = SensorMetadata(**sensorMetadata)
self.sensorReading = SensorReading(**data)
......@@ -90,7 +90,7 @@ class SensorResponse(object):
print(response) # Ensure 200 Response!
return
class Gateway(object):
class GatewayMetadata(object):
def __init__(self):
self.gatewayUID = getserial()
self.apiKey = secrets.API_KEY
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment