Module python_odpt.api.default.railway_fare_operations_get_railway_fares

Functions

async def asyncio(*,
client: AuthenticatedClient | Client,
aclconsumer_key: str,
id: Unset | str = <python_odpt.types.Unset object>,
owlsame_as: Unset | str = <python_odpt.types.Unset object>,
odptoperator: Unset | str = <python_odpt.types.Unset object>,
odptfrom_station: Unset | str = <python_odpt.types.Unset object>,
odptto_station: Unset | str = <python_odpt.types.Unset object>) ‑> Any | List[RailwayFare] | None
Expand source code
async def asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    aclconsumer_key: str,
    id: Union[Unset, str] = UNSET,
    owlsame_as: Union[Unset, str] = UNSET,
    odptoperator: Union[Unset, str] = UNSET,
    odptfrom_station: Union[Unset, str] = UNSET,
    odptto_station: Union[Unset, str] = UNSET,
) -> Optional[Union[Any, List["RailwayFare"]]]:
    """2駅間の運賃を取得する

    Args:
        aclconsumer_key (str): アクセストークン
        id (Union[Unset, str]): 固有識別子
        owlsame_as (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptoperator (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptfrom_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptto_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Union[Any, List['RailwayFare']]
    """

    return (
        await asyncio_detailed(
            client=client,
            aclconsumer_key=aclconsumer_key,
            id=id,
            owlsame_as=owlsame_as,
            odptoperator=odptoperator,
            odptfrom_station=odptfrom_station,
            odptto_station=odptto_station,
        )
    ).parsed

2駅間の運賃を取得する

Args

aclconsumer_key : str
アクセストークン
id : Union[Unset, str]
固有識別子
owlsame_as : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptoperator : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptfrom_station : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptto_station : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式

Raises

errors.UnexpectedStatus
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException
If the request takes longer than Client.timeout.

Returns

Union[Any, List['RailwayFare']]

async def asyncio_detailed(*,
client: AuthenticatedClient | Client,
aclconsumer_key: str,
id: Unset | str = <python_odpt.types.Unset object>,
owlsame_as: Unset | str = <python_odpt.types.Unset object>,
odptoperator: Unset | str = <python_odpt.types.Unset object>,
odptfrom_station: Unset | str = <python_odpt.types.Unset object>,
odptto_station: Unset | str = <python_odpt.types.Unset object>) ‑> Response[Any | List[RailwayFare]]
Expand source code
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    aclconsumer_key: str,
    id: Union[Unset, str] = UNSET,
    owlsame_as: Union[Unset, str] = UNSET,
    odptoperator: Union[Unset, str] = UNSET,
    odptfrom_station: Union[Unset, str] = UNSET,
    odptto_station: Union[Unset, str] = UNSET,
) -> Response[Union[Any, List["RailwayFare"]]]:
    """2駅間の運賃を取得する

    Args:
        aclconsumer_key (str): アクセストークン
        id (Union[Unset, str]): 固有識別子
        owlsame_as (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptoperator (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptfrom_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptto_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response[Union[Any, List['RailwayFare']]]
    """

    kwargs = _get_kwargs(
        aclconsumer_key=aclconsumer_key,
        id=id,
        owlsame_as=owlsame_as,
        odptoperator=odptoperator,
        odptfrom_station=odptfrom_station,
        odptto_station=odptto_station,
    )

    response = await client.get_async_httpx_client().request(**kwargs)

    return _build_response(client=client, response=response)

2駅間の運賃を取得する

Args

aclconsumer_key : str
アクセストークン
id : Union[Unset, str]
固有識別子
owlsame_as : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptoperator : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptfrom_station : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptto_station : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式

Raises

errors.UnexpectedStatus
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException
If the request takes longer than Client.timeout.

Returns

Response[Union[Any, List['RailwayFare']]]

def sync(*,
client: AuthenticatedClient | Client,
aclconsumer_key: str,
id: Unset | str = <python_odpt.types.Unset object>,
owlsame_as: Unset | str = <python_odpt.types.Unset object>,
odptoperator: Unset | str = <python_odpt.types.Unset object>,
odptfrom_station: Unset | str = <python_odpt.types.Unset object>,
odptto_station: Unset | str = <python_odpt.types.Unset object>) ‑> Any | List[RailwayFare] | None
Expand source code
def sync(
    *,
    client: Union[AuthenticatedClient, Client],
    aclconsumer_key: str,
    id: Union[Unset, str] = UNSET,
    owlsame_as: Union[Unset, str] = UNSET,
    odptoperator: Union[Unset, str] = UNSET,
    odptfrom_station: Union[Unset, str] = UNSET,
    odptto_station: Union[Unset, str] = UNSET,
) -> Optional[Union[Any, List["RailwayFare"]]]:
    """2駅間の運賃を取得する

    Args:
        aclconsumer_key (str): アクセストークン
        id (Union[Unset, str]): 固有識別子
        owlsame_as (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptoperator (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptfrom_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptto_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Union[Any, List['RailwayFare']]
    """

    return sync_detailed(
        client=client,
        aclconsumer_key=aclconsumer_key,
        id=id,
        owlsame_as=owlsame_as,
        odptoperator=odptoperator,
        odptfrom_station=odptfrom_station,
        odptto_station=odptto_station,
    ).parsed

2駅間の運賃を取得する

Args

aclconsumer_key : str
アクセストークン
id : Union[Unset, str]
固有識別子
owlsame_as : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptoperator : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptfrom_station : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptto_station : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式

Raises

errors.UnexpectedStatus
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException
If the request takes longer than Client.timeout.

Returns

Union[Any, List['RailwayFare']]

def sync_detailed(*,
client: AuthenticatedClient | Client,
aclconsumer_key: str,
id: Unset | str = <python_odpt.types.Unset object>,
owlsame_as: Unset | str = <python_odpt.types.Unset object>,
odptoperator: Unset | str = <python_odpt.types.Unset object>,
odptfrom_station: Unset | str = <python_odpt.types.Unset object>,
odptto_station: Unset | str = <python_odpt.types.Unset object>) ‑> Response[Any | List[RailwayFare]]
Expand source code
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    aclconsumer_key: str,
    id: Union[Unset, str] = UNSET,
    owlsame_as: Union[Unset, str] = UNSET,
    odptoperator: Union[Unset, str] = UNSET,
    odptfrom_station: Union[Unset, str] = UNSET,
    odptto_station: Union[Unset, str] = UNSET,
) -> Response[Union[Any, List["RailwayFare"]]]:
    """2駅間の運賃を取得する

    Args:
        aclconsumer_key (str): アクセストークン
        id (Union[Unset, str]): 固有識別子
        owlsame_as (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptoperator (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptfrom_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式
        odptto_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response[Union[Any, List['RailwayFare']]]
    """

    kwargs = _get_kwargs(
        aclconsumer_key=aclconsumer_key,
        id=id,
        owlsame_as=owlsame_as,
        odptoperator=odptoperator,
        odptfrom_station=odptfrom_station,
        odptto_station=odptto_station,
    )

    response = client.get_httpx_client().request(
        **kwargs,
    )

    return _build_response(client=client, response=response)

2駅間の運賃を取得する

Args

aclconsumer_key : str
アクセストークン
id : Union[Unset, str]
固有識別子
owlsame_as : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptoperator : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptfrom_station : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式
odptto_station : Union[Unset, str]
固有識別子の別名 多くがodpt.hoge:fuga形式

Raises

errors.UnexpectedStatus
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
httpx.TimeoutException
If the request takes longer than Client.timeout.

Returns

Response[Union[Any, List['RailwayFare']]]