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 bands to raster stream api #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
19 changes: 17 additions & 2 deletions .generation/input/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"servers": [
{
"url": "http://0.0.0.0:8080/api"
"url": "http://127.0.0.1:3030/api"
}
],
"paths": {
Expand Down Expand Up @@ -4561,6 +4561,14 @@
"$ref": "#/components/schemas/SpatialResolution"
}
},
{
"name": "attributes",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "resultType",
"in": "query",
Expand Down Expand Up @@ -4830,6 +4838,13 @@
"eastNorth"
]
},
"BandSelection": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
},
"BoundingBox2D": {
"type": "object",
"description": "A bounding box that includes all border points.\nNote: may degenerate to a point!",
Expand Down Expand Up @@ -9532,4 +9547,4 @@
"url": "https://docs.geoengine.io",
"description": "Geo Engine Docs"
}
}
}
6 changes: 3 additions & 3 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ import geoengine_openapi_client
from geoengine_openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://0.0.0.0:8080/api
# Defining the host is optional and defaults to http://127.0.0.1:3030/api
# See configuration.py for a list of all supported configuration parameters.
configuration = geoengine_openapi_client.Configuration(
host = "http://0.0.0.0:8080/api"
host = "http://127.0.0.1:3030/api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -90,7 +90,7 @@ with geoengine_openapi_client.ApiClient(configuration) as api_client:

## Documentation for API Endpoints

All URIs are relative to *http://0.0.0.0:8080/api*
All URIs are relative to *http://127.0.0.1:3030/api*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
Expand Down
18 changes: 13 additions & 5 deletions python/geoengine_openapi_client/api/workflows_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,14 +770,14 @@ def load_workflow_handler_with_http_info(self, id : Annotated[StrictStr, Field(.
_request_auth=_params.get('_request_auth'))

@validate_arguments
def raster_stream_websocket(self, id : Annotated[StrictStr, Field(..., description="Workflow id")], spatial_bounds : SpatialPartition2D, time_interval : StrictStr, spatial_resolution : SpatialResolution, result_type : RasterStreamWebsocketResultType, **kwargs) -> None: # noqa: E501
def raster_stream_websocket(self, id : Annotated[StrictStr, Field(..., description="Workflow id")], spatial_bounds : SpatialPartition2D, time_interval : StrictStr, spatial_resolution : SpatialResolution, attributes : StrictStr, result_type : RasterStreamWebsocketResultType, **kwargs) -> None: # noqa: E501
"""Query a workflow raster result as a stream of tiles via a websocket connection. # noqa: E501

Query a workflow raster result as a stream of tiles via a websocket connection. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.raster_stream_websocket(id, spatial_bounds, time_interval, spatial_resolution, result_type, async_req=True)
>>> thread = api.raster_stream_websocket(id, spatial_bounds, time_interval, spatial_resolution, attributes, result_type, async_req=True)
>>> result = thread.get()

:param id: Workflow id (required)
Expand All @@ -788,6 +788,8 @@ def raster_stream_websocket(self, id : Annotated[StrictStr, Field(..., descripti
:type time_interval: str
:param spatial_resolution: (required)
:type spatial_resolution: SpatialResolution
:param attributes: (required)
:type attributes: str
:param result_type: (required)
:type result_type: RasterStreamWebsocketResultType
:param async_req: Whether to execute the request asynchronously.
Expand All @@ -805,17 +807,17 @@ def raster_stream_websocket(self, id : Annotated[StrictStr, Field(..., descripti
if '_preload_content' in kwargs:
message = "Error! Please call the raster_stream_websocket_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
raise ValueError(message)
return self.raster_stream_websocket_with_http_info(id, spatial_bounds, time_interval, spatial_resolution, result_type, **kwargs) # noqa: E501
return self.raster_stream_websocket_with_http_info(id, spatial_bounds, time_interval, spatial_resolution, attributes, result_type, **kwargs) # noqa: E501

@validate_arguments
def raster_stream_websocket_with_http_info(self, id : Annotated[StrictStr, Field(..., description="Workflow id")], spatial_bounds : SpatialPartition2D, time_interval : StrictStr, spatial_resolution : SpatialResolution, result_type : RasterStreamWebsocketResultType, **kwargs) -> ApiResponse: # noqa: E501
def raster_stream_websocket_with_http_info(self, id : Annotated[StrictStr, Field(..., description="Workflow id")], spatial_bounds : SpatialPartition2D, time_interval : StrictStr, spatial_resolution : SpatialResolution, attributes : StrictStr, result_type : RasterStreamWebsocketResultType, **kwargs) -> ApiResponse: # noqa: E501
"""Query a workflow raster result as a stream of tiles via a websocket connection. # noqa: E501

Query a workflow raster result as a stream of tiles via a websocket connection. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.raster_stream_websocket_with_http_info(id, spatial_bounds, time_interval, spatial_resolution, result_type, async_req=True)
>>> thread = api.raster_stream_websocket_with_http_info(id, spatial_bounds, time_interval, spatial_resolution, attributes, result_type, async_req=True)
>>> result = thread.get()

:param id: Workflow id (required)
Expand All @@ -826,6 +828,8 @@ def raster_stream_websocket_with_http_info(self, id : Annotated[StrictStr, Field
:type time_interval: str
:param spatial_resolution: (required)
:type spatial_resolution: SpatialResolution
:param attributes: (required)
:type attributes: str
:param result_type: (required)
:type result_type: RasterStreamWebsocketResultType
:param async_req: Whether to execute the request asynchronously.
Expand Down Expand Up @@ -860,6 +864,7 @@ def raster_stream_websocket_with_http_info(self, id : Annotated[StrictStr, Field
'spatial_bounds',
'time_interval',
'spatial_resolution',
'attributes',
'result_type'
]
_all_params.extend(
Expand Down Expand Up @@ -903,6 +908,9 @@ def raster_stream_websocket_with_http_info(self, id : Annotated[StrictStr, Field
if _params.get('spatial_resolution') is not None: # noqa: E501
_query_params.append(('spatialResolution', _params['spatial_resolution']))

if _params.get('attributes') is not None: # noqa: E501
_query_params.append(('attributes', _params['attributes']))

if _params.get('result_type') is not None: # noqa: E501
_query_params.append(('resultType', _params['result_type'].value))

Expand Down
4 changes: 2 additions & 2 deletions python/geoengine_openapi_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self, host=None,
) -> None:
"""Constructor
"""
self._base_path = "http://0.0.0.0:8080/api" if host is None else host
self._base_path = "http://127.0.0.1:3030/api" if host is None else host
"""Default Base url
"""
self.server_index = 0 if server_index is None and host is None else server_index
Expand Down Expand Up @@ -388,7 +388,7 @@ def get_host_settings(self):
"""
return [
{
'url': "http://0.0.0.0:8080/api",
'url': "http://127.0.0.1:3030/api",
'description': "No description provided",
}
]
Expand Down
1 change: 1 addition & 0 deletions typescript/dist/apis/WorkflowsApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface RasterStreamWebsocketRequest {
spatialBounds: SpatialPartition2D;
timeInterval: string;
spatialResolution: SpatialResolution;
attributes: string;
resultType: RasterStreamWebsocketResultType;
}
export interface RegisterWorkflowHandlerRequest {
Expand Down
6 changes: 6 additions & 0 deletions typescript/dist/apis/WorkflowsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ class WorkflowsApi extends runtime.BaseAPI {
if (requestParameters.spatialResolution === null || requestParameters.spatialResolution === undefined) {
throw new runtime.RequiredError('spatialResolution', 'Required parameter requestParameters.spatialResolution was null or undefined when calling rasterStreamWebsocket.');
}
if (requestParameters.attributes === null || requestParameters.attributes === undefined) {
throw new runtime.RequiredError('attributes', 'Required parameter requestParameters.attributes was null or undefined when calling rasterStreamWebsocket.');
}
if (requestParameters.resultType === null || requestParameters.resultType === undefined) {
throw new runtime.RequiredError('resultType', 'Required parameter requestParameters.resultType was null or undefined when calling rasterStreamWebsocket.');
}
Expand All @@ -250,6 +253,9 @@ class WorkflowsApi extends runtime.BaseAPI {
if (requestParameters.spatialResolution !== undefined) {
queryParameters['spatialResolution'] = requestParameters.spatialResolution;
}
if (requestParameters.attributes !== undefined) {
queryParameters['attributes'] = requestParameters.attributes;
}
if (requestParameters.resultType !== undefined) {
queryParameters['resultType'] = requestParameters.resultType;
}
Expand Down
1 change: 1 addition & 0 deletions typescript/dist/esm/apis/WorkflowsApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface RasterStreamWebsocketRequest {
spatialBounds: SpatialPartition2D;
timeInterval: string;
spatialResolution: SpatialResolution;
attributes: string;
resultType: RasterStreamWebsocketResultType;
}
export interface RegisterWorkflowHandlerRequest {
Expand Down
6 changes: 6 additions & 0 deletions typescript/dist/esm/apis/WorkflowsApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ export class WorkflowsApi extends runtime.BaseAPI {
if (requestParameters.spatialResolution === null || requestParameters.spatialResolution === undefined) {
throw new runtime.RequiredError('spatialResolution', 'Required parameter requestParameters.spatialResolution was null or undefined when calling rasterStreamWebsocket.');
}
if (requestParameters.attributes === null || requestParameters.attributes === undefined) {
throw new runtime.RequiredError('attributes', 'Required parameter requestParameters.attributes was null or undefined when calling rasterStreamWebsocket.');
}
if (requestParameters.resultType === null || requestParameters.resultType === undefined) {
throw new runtime.RequiredError('resultType', 'Required parameter requestParameters.resultType was null or undefined when calling rasterStreamWebsocket.');
}
Expand All @@ -247,6 +250,9 @@ export class WorkflowsApi extends runtime.BaseAPI {
if (requestParameters.spatialResolution !== undefined) {
queryParameters['spatialResolution'] = requestParameters.spatialResolution;
}
if (requestParameters.attributes !== undefined) {
queryParameters['attributes'] = requestParameters.attributes;
}
if (requestParameters.resultType !== undefined) {
queryParameters['resultType'] = requestParameters.resultType;
}
Expand Down
2 changes: 1 addition & 1 deletion typescript/dist/esm/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
export const BASE_PATH = "http://0.0.0.0:8080/api".replace(/\/+$/, "");
export const BASE_PATH = "http://127.0.0.1:3030/api".replace(/\/+$/, "");
export class Configuration {
constructor(configuration = {}) {
this.configuration = configuration;
Expand Down
2 changes: 1 addition & 1 deletion typescript/dist/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
exports.BASE_PATH = "http://0.0.0.0:8080/api".replace(/\/+$/, "");
exports.BASE_PATH = "http://127.0.0.1:3030/api".replace(/\/+$/, "");
class Configuration {
constructor(configuration = {}) {
this.configuration = configuration;
Expand Down
9 changes: 9 additions & 0 deletions typescript/src/apis/WorkflowsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export interface RasterStreamWebsocketRequest {
spatialBounds: SpatialPartition2D;
timeInterval: string;
spatialResolution: SpatialResolution;
attributes: string;
resultType: RasterStreamWebsocketResultType;
}

Expand Down Expand Up @@ -312,6 +313,10 @@ export class WorkflowsApi extends runtime.BaseAPI {
throw new runtime.RequiredError('spatialResolution','Required parameter requestParameters.spatialResolution was null or undefined when calling rasterStreamWebsocket.');
}

if (requestParameters.attributes === null || requestParameters.attributes === undefined) {
throw new runtime.RequiredError('attributes','Required parameter requestParameters.attributes was null or undefined when calling rasterStreamWebsocket.');
}

if (requestParameters.resultType === null || requestParameters.resultType === undefined) {
throw new runtime.RequiredError('resultType','Required parameter requestParameters.resultType was null or undefined when calling rasterStreamWebsocket.');
}
Expand All @@ -330,6 +335,10 @@ export class WorkflowsApi extends runtime.BaseAPI {
queryParameters['spatialResolution'] = requestParameters.spatialResolution;
}

if (requestParameters.attributes !== undefined) {
queryParameters['attributes'] = requestParameters.attributes;
}

if (requestParameters.resultType !== undefined) {
queryParameters['resultType'] = requestParameters.resultType;
}
Expand Down
2 changes: 1 addition & 1 deletion typescript/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/


export const BASE_PATH = "http://0.0.0.0:8080/api".replace(/\/+$/, "");
export const BASE_PATH = "http://127.0.0.1:3030/api".replace(/\/+$/, "");

export interface ConfigurationParameters {
basePath?: string; // override base path
Expand Down
Loading