-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #327 from hackforla/324_BACK_ReqDetail
Added requestDetail endpoint
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from .dataService import DataService | ||
|
||
|
||
class RequestDetailService(object): | ||
def __init__(self, config=None, tableName="ingest_staging_table"): | ||
self.dataAccess = DataService(config, tableName) | ||
|
||
async def get_request_detail(self, requestNumber=None): | ||
""" | ||
Returns all properties tied to a service request given the srNumber | ||
{ | ||
'LastPulled': 'Timestamp', | ||
'data': { | ||
'ncname':'String', | ||
'requesttype':'String', | ||
'srnumber':'String', | ||
'latitude': 'String', | ||
'longitude': 'String', | ||
'address': 'String', | ||
'createddate': 'Timestamp' | ||
. | ||
. | ||
. | ||
} | ||
} | ||
""" | ||
|
||
items = ['*'] | ||
filters = ['srnumber = \'{}\''.format(requestNumber)] | ||
result = self.dataAccess.query(items, filters) | ||
|
||
return result |