Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add language support to geolocation API #23

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading