gfwapiclient.resources.vessels.list.endpoints
¶
Global Fishing Watch (GFW) API Python Client - Get Vessels by IDs API EndPoint.
This module defines the endpoint for retrieving a list of vessels by IDs.
Module Contents¶
Classes¶
Get list of vessels by IDs API endpoint. |
Data¶
API¶
- gfwapiclient.resources.vessels.list.endpoints.__all__ = ['VesselListEndPoint']¶
- class gfwapiclient.resources.vessels.list.endpoints.VesselListEndPoint(*, request_params: gfwapiclient.resources.vessels.list.models.request.VesselListParams, http_client: gfwapiclient.http.client.HTTPClient)¶
Bases:
gfwapiclient.http.endpoints.GetEndPoint
[gfwapiclient.resources.vessels.list.models.request.VesselListParams
,gfwapiclient.http.models.RequestBody
,gfwapiclient.resources.vessels.list.models.response.VesselListItem
,gfwapiclient.resources.vessels.list.models.response.VesselListResult
]Get list of vessels by IDs API endpoint.
This endpoint retrieves a list of vessels based on the provided IDs and other request parameters.
Initialization
Initializes a new VesselListEndPoint API endpoint.
- Args:
- request_params (VesselListParams):
The request parameters containing the vessel IDs.
- 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 VesselListResult 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.