Update api spec (#97)
* YOYO NEW API SPEC! * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * attempt fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * I have generated the latest API! --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
		@ -4,20 +4,20 @@ import httpx
 | 
			
		||||
 | 
			
		||||
from ...client import Client
 | 
			
		||||
from ...models.error import Error
 | 
			
		||||
from ...models.unit_energy import UnitEnergy
 | 
			
		||||
from ...models.unit_energy_conversion import UnitEnergyConversion
 | 
			
		||||
from ...models.unit_energy_format import UnitEnergyFormat
 | 
			
		||||
from ...types import Response
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    output_format: UnitEnergyFormat,
 | 
			
		||||
    src_format: UnitEnergyFormat,
 | 
			
		||||
    input_unit: UnitEnergy,
 | 
			
		||||
    output_unit: UnitEnergy,
 | 
			
		||||
    value: float,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/unit/conversion/energy/{src_format}/{output_format}".format(
 | 
			
		||||
        client.base_url, output_format=output_format, src_format=src_format
 | 
			
		||||
    url = "{}/unit/conversion/energy/{input_unit}/{output_unit}".format(
 | 
			
		||||
        client.base_url, input_unit=input_unit, output_unit=output_unit
 | 
			
		||||
    )  # noqa: E501
 | 
			
		||||
    if value is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
@ -63,15 +63,15 @@ def _build_response(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    output_format: UnitEnergyFormat,
 | 
			
		||||
    src_format: UnitEnergyFormat,
 | 
			
		||||
    input_unit: UnitEnergy,
 | 
			
		||||
    output_unit: UnitEnergy,
 | 
			
		||||
    value: float,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        output_format=output_format,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        input_unit=input_unit,
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        value=value,
 | 
			
		||||
        client=client,
 | 
			
		||||
    )
 | 
			
		||||
@ -85,8 +85,8 @@ def sync_detailed(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    output_format: UnitEnergyFormat,
 | 
			
		||||
    src_format: UnitEnergyFormat,
 | 
			
		||||
    input_unit: UnitEnergy,
 | 
			
		||||
    output_unit: UnitEnergy,
 | 
			
		||||
    value: float,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
@ -94,23 +94,23 @@ def sync(
 | 
			
		||||
    """Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions."""  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        output_format=output_format,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        input_unit=input_unit,
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        value=value,
 | 
			
		||||
        client=client,
 | 
			
		||||
    ).parsed
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    output_format: UnitEnergyFormat,
 | 
			
		||||
    src_format: UnitEnergyFormat,
 | 
			
		||||
    input_unit: UnitEnergy,
 | 
			
		||||
    output_unit: UnitEnergy,
 | 
			
		||||
    value: float,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Response[Optional[Union[UnitEnergyConversion, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        output_format=output_format,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        input_unit=input_unit,
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        value=value,
 | 
			
		||||
        client=client,
 | 
			
		||||
    )
 | 
			
		||||
@ -122,8 +122,8 @@ async def asyncio_detailed(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    output_format: UnitEnergyFormat,
 | 
			
		||||
    src_format: UnitEnergyFormat,
 | 
			
		||||
    input_unit: UnitEnergy,
 | 
			
		||||
    output_unit: UnitEnergy,
 | 
			
		||||
    value: float,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
@ -132,8 +132,8 @@ async def asyncio(
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
        await asyncio_detailed(
 | 
			
		||||
            output_format=output_format,
 | 
			
		||||
            src_format=src_format,
 | 
			
		||||
            input_unit=input_unit,
 | 
			
		||||
            output_unit=output_unit,
 | 
			
		||||
            value=value,
 | 
			
		||||
            client=client,
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user