Skip to content

Commit

Permalink
Add lang_code param to geolocation requests
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed May 6, 2024
1 parent 31064f6 commit c38d94f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions neon_hana/mq_service_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def get_session(self, node_data: NodeData) -> dict:
def query_api_proxy(self, service_name: str, query_params: dict,
timeout: int = 10):
query_params['service'] = service_name
lang_code = query_params['lang_code']
response = send_mq_request("/neon_api", query_params, "neon_api_input",
"neon_api_output", timeout)
return self._validate_api_proxy_response(response, query_params)
Expand Down
8 changes: 6 additions & 2 deletions neon_hana/schema/api_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,27 @@ class StockAPIQuoteRequest(BaseModel):

class GeoAPIRequest(BaseModel):
address: str
lang_code: str = "en"

model_config = {
"json_schema_extra": {
"examples": [{
"address": "1100 Bellevue Way NE Bellevue, WA"
"address": "1100 Bellevue Way NE Bellevue, WA",
"lang_code": "en"
}]}}


class GeoAPIReverseRequest(BaseModel):
lat: float
lon: float
lang_code: str = "en"
model_config = {
"json_schema_extra": {
"examples": [{
"lat": 47.6815,
"lon": -122.2087,
}]}}
"lang_code": "en"
}]}}


class WolframAlphaAPIRequest(BaseModel):
Expand Down

0 comments on commit c38d94f

Please sign in to comment.