gfwapiclient.resources.vessels.search.endpoints

Global Fishing Watch (GFW) API Python Client - Vessels Search API EndPoint.

This module defines the endpoint for searching vessels.

Module Contents

Classes

VesselSearchEndPoint

Search vessels API endpoint.

Data

API

gfwapiclient.resources.vessels.search.endpoints.__all__ = ['VesselSearchEndPoint']
class gfwapiclient.resources.vessels.search.endpoints.VesselSearchEndPoint(*, request_params: gfwapiclient.resources.vessels.search.models.request.VesselSearchParams, http_client: gfwapiclient.http.client.HTTPClient)

Bases: gfwapiclient.http.endpoints.GetEndPoint[gfwapiclient.resources.vessels.search.models.request.VesselSearchParams, gfwapiclient.http.models.RequestBody, gfwapiclient.resources.vessels.search.models.response.VesselSearchItem, gfwapiclient.resources.vessels.search.models.response.VesselSearchResult]

Search vessels API endpoint.

This endpoint searches for vessels based on the provided search request parameters.

Initialization

Initializes a new VesselSearchEndPoint API endpoint.

Args:
request_params (VesselSearchParams):

The search parameters for the API call.

http_client (HTTPClient):

The HTTP client used to make the API call.

_transform_response_data(*, body: Union[List[Dict[str, Any]], Dict[str, Any]]) Union[List[Dict[str, Any]], Dict[str, Any]]

Transform and reshape response body and yield data.

This method transforms the raw response body from the API into a format suitable for the VesselSearchResult model.

The expected response structure is: {“entries”: [{…}]}.

Args:
body (Union[List[Dict[str, Any]], Dict[str, Any]]):

The raw response body.

Returns:
Union[List[Dict[str, Any]], Dict[str, Any]]:

The transformed response data.

Raises:
ResultValidationError:

If the response body does not match the expected format.