Skip to content

Commit

Permalink
Remove vessel_product_types paramater from vessl reference (#513)
Browse files Browse the repository at this point in the history
* chore: rm vessel product types param

* chore: format

* chore: version bump
  • Loading branch information
ministrudels authored Oct 23, 2024
1 parent e47cac3 commit 3a561e3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 39 deletions.
12 changes: 0 additions & 12 deletions vortexasdk/endpoints/vessel_positions.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,6 @@ def search(
| ...to >800 results
Note that we will show you all fields by default if you don't set the columns argument.
```
- Now let's find positions for vessels carrying crude, using the Vessels and Product Reference endpoints
```python
>>> from vortexasdk import Vessels, Products
>>> crude = [p.id for p in Products().search(term="crude").to_list() if 'group' in p.layer]
>>> vessels_list = Vessels().search(vessel_product_types=crude).to_list()
>>> vessel_ids = [v.id for v in vessels_list]
>>> crude_positions = VesselPositions().search(vessel_id=vessel_ids).to_df()
```
# Further Documentation
Expand Down
12 changes: 0 additions & 12 deletions vortexasdk/endpoints/vessel_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,6 @@ def search(
| ...to >800 results
Note that we will show you all fields by default if you don't set the columns argument.
```
- Now let's find summaries for vessels carrying crude, using the Vessels and Product Reference endpoints
```python
>>> from vortexasdk import Vessels, Products
>>> crude = [p.id for p in Products().search(term="crude").to_list() if 'group' in p.layer]
>>> vessels_list = Vessels().search(vessel_product_types=crude).to_list()
>>> vessel_ids = [v.id for v in vessels_list]
>>> crude_summaries = VesselSummary().search(vessel_id=vessel_ids).to_df()
```
# Further Documentation
Expand Down
14 changes: 0 additions & 14 deletions vortexasdk/endpoints/vessels.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def search(
term: Union[str, List[str]] = None,
ids: Union[str, List[str]] = None,
vessel_classes: Union[str, List[str]] = None,
vessel_product_types: Union[ID, List[ID]] = None,
vessel_scrubbers: str = "disabled",
exact_term_match: bool = False,
) -> VesselsResult:
Expand All @@ -43,8 +42,6 @@ def search(
vessel_classes: vessel_class (or list of vessel classes) we'd like to search. Each vessel class must be one of `"oil_coastal", "oil_intermediate", "oil_flexi", "oil_handysize", "oil_mr1","oil_handymax", "oil_mr2", "oil_panamax", "oil_lr1", "oil_aframax", "oil_lr2", "oil_suezmax","oil_lr3", "oil_vlcc","lpg_coasters", "lpg_handysize", "lpg_mgc", "lpg_lgc", "lpg_vlgc", "lpg_vlec", "lng_small_scale_lng", "lng_mid_scale_lng", "lng_two_stroke", "lng_tfde_dfde", "lng_steam", "lng_ssd", "lng_q_flex", "lng_q_max", "oil_coastal", "oil_specialised", "oil_handysize_mr1", "oil_handymax_mr2", "oil_panamax_lr1", "oil_aframax_lr2", "oil_suezmax_lr3", "oil_vlcc","lpg_sgc", "lpg_mgc", "lpg_lgc", "lpg_vlgc_vlec","lng_small_scale_lng", "lng_mid_scale_lng","lng_conventional_lng", "lng_q_fleet", "oil", "lpg", "lng",`. Refer to [VortexaAPI Vessel Entities](https://docs.vortexa.com/reference/intro-vessel-entities) for the most up-to-date list of vessel classes.
vessel_product_types: A product ID, or list of product IDs to filter on, searching vessels _currently_ carrying these products.
vessel_scrubbers: An optional filter to filter on vessels with or without scrubbers.
To disable the filter (the default behaviour), enter 'disabled'.
To only include vessels with scrubbers, enter 'inc'.
Expand Down Expand Up @@ -82,16 +79,6 @@ def search(
Note the `term` search also looks for vessels with matching `related_names`
- Let's find all the vessels currently carrying Crude.
```python
>>> from vortexasdk import Vessels, Products
>>> crude = [p.id for p in Products().search(term="crude").to_list() if 'group' in p.layer]
>>> vessels_df = Vessels().search(vessel_product_types=crude).to_df()
```
# Further Documentation
[VortexaAPI Vessel Reference](https://docs.vortexa.com/reference/POST/reference/vessels)
Expand All @@ -100,7 +87,6 @@ def search(
api_params: Dict[str, Any] = {
"term": [str(e) for e in convert_to_list(term)],
"ids": convert_to_list(ids),
"vessel_product_types": convert_to_list(vessel_product_types),
"vessel_classes": [
v.lower() for v in convert_to_list(vessel_classes)
],
Expand Down
2 changes: 1 addition & 1 deletion vortexasdk/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.74.4"
__version__ = "0.75.0"

0 comments on commit 3a561e3

Please sign in to comment.