summaryrefslogtreecommitdiff
path: root/app/constants
diff options
context:
space:
mode:
authorDylan Bolger <dylan.bolger00@gmail.com>2023-11-16 20:40:52 -0600
committerDylan Bolger <dylan.bolger00@gmail.com>2023-11-16 20:40:52 -0600
commitade346b2e048c1adbfc656dee4778741fe773c4f (patch)
treecec1d32a1689f0c9ebf6c54909f7a93e4c00514e /app/constants
parentfb4b161ae30fd2f730a4c2d5935e8a761a335ed7 (diff)
downloadcity-utilities-restful-wrapper-ade346b2e048c1adbfc656dee4778741fe773c4f.tar.xz
city-utilities-restful-wrapper-ade346b2e048c1adbfc656dee4778741fe773c4f.zip
Refactor energy_request, do data cleanup in response for API consumer
Diffstat (limited to 'app/constants')
-rw-r--r--app/constants/constants.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/app/constants/constants.py b/app/constants/constants.py
index 4bdc5dd..f9acf56 100644
--- a/app/constants/constants.py
+++ b/app/constants/constants.py
@@ -1,6 +1,20 @@
from app.request.login.credentials import *
+from enum import Enum
-# TODO: Organize this better
+# Useless response key/pairs
+uselessResponseKeys = ['DemandColorCode', 'UsageDelvcolorCode', 'UsageReccolorCode',
+ 'UsageColorCode', 'SoFarColorCode', 'ExpectedUsageColorCode',
+ 'PeakLoadColorCode', 'AverageColorCode', 'LoadFactorColorCode',
+ 'HighestColorCode', 'IsOnlyAMI', 'Skey', 'AccountNumber',
+ 'UpToDecimalPlaces', 'UsageCycle', 'PeakLoad', 'LoadFactor',
+ 'DemandValue', 'UsageRecValue', 'WeatherUsageDate']
+
+# Possible energy request modes
+class RequestMode(Enum):
+ halfHour = 'MI'
+ hour = 'H'
+ day = 'D'
+ month = 'M'
# Shared
genericRequestHeaders = {
@@ -77,7 +91,6 @@ electricUsageRequestJson = {
# Set Mode
'UsageOrGeneration': '1',
'Type': 'K',
- 'strDate': '',
'hourlyType': 'H',
'SeasonId': '',
'weatherOverlay': 0,
@@ -90,7 +103,6 @@ electricUsageRequestJson = {
waterUsageRequestJson = {
# Set Mode
"Type":"W",
- "strDate":"",
"hourlyType":"H",
"seasonId":"",
"weatherOverlay":0,