vortexasdk.endpoints.corporations
Try me out in your browser:
Corporations
Corporations(self)
Corporations Endpoint.
load_all
Corporations.load_all(self) -> vortexasdk.endpoints.corporations_result.CorporationsResult
Load all corporations.
search
Corporations.search(self, term: Union[str, List[str]] = None, exact_term_match: bool = False) -> vortexasdk.endpoints.corporations_result.CorporationsResult
Find all Corporations matching given search terms.
Arguments
-
term: The corporation name(s) we're filtering on
-
exact_term_match: Search on only exact term matches, or allow similar matches. e.g. When searching for "COS" with
exact_term_match=False
, then the SDK will yield corporations named ['COSCO', 'COSMO OIL'] etc. Whenexact_term_match=True
, the SDK won't yield any results, because no corporations have the exact name "COS".
Returns
List of corporation matching term
Examples
Let's load all corporations
>>> from vortexasdk import Corporations
>>> df = Corporations().search().to_df()
returns
id | name | corporate_entity_type | |
---|---|---|---|
0 | 04f418ee78c1e17744ad653e7815e8e28891ed9ba25a8427030e4478e5c00974 | 3J | ['effective_controller'] |
1 | b6384cf17f1639a64bbff04cfd32257bf732a3a13e4b0532802a9ae84a36be34 | 5XJAPANESE | ['effective_controller'] |
Let's find all corporations with 'do' in the name.
>>> [x.name for x in Corporations().search(term="do").to_list()]
[...]
Further Documentation
VortexaAPI Corporation Reference
reference
Corporations.reference(self, id: str) -> Dict
Perform a corporation lookup.
Arguments
- id: Corporation ID to lookup
Returns
Corporation record matching the ID
Further Documentation:
VortexaAPI Corporation Reference
Examples
Corporations().reference(id='12345abcdef') # doctest: +SKIP
vortexasdk.endpoints.corporations_result
CorporationsResult
CorporationsResult(__pydantic_self__, **data: Any) -> None
Container class that holds the result obtained from calling the Vessels
endpoint.
to_list
CorporationsResult.to_list(self) -> List[vortexasdk.api.corporation.Corporation]
Represent vessels as a list.
to_df
CorporationsResult.to_df(self, columns=['id', 'name', 'corporate_entity_type']) -> pandas.core.frame.DataFrame
Represent corporations as a pd.DataFrame
.
Arguments
- columns: The corporation features we want in the dataframe. Enter
columns='all'
to include all features. Defaults tocolumns = ['id', 'name', 'corporate_entity_type']
.
Returns
pd.DataFrame
of corporations.