Skip to content

Commit

Permalink
fix: automatic api update (#42)
Browse files Browse the repository at this point in the history
Co-authored-by: ErnoW <[email protected]>
  • Loading branch information
github-actions[bot] and ErnoW authored Sep 12, 2023
1 parent 97f000f commit 31050a1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 156 deletions.
2 changes: 0 additions & 2 deletions docs/evm_api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ params = {
"from_date": "",
"to_date": "",
"offset": 0,
"cursor": "",
"limit": 0,
"cursor": "",
}
Expand Down Expand Up @@ -56,7 +55,6 @@ print(result)
| from_date | str | The start date from which to get the logs (any format that is accepted by momentjs)<br/>* Provide the param 'from_block' or 'from_date'<br/>* If 'from_date' and 'from_block' are provided, 'from_block' will be used.<br/> | | | "" |
| to_date | str | Get the logs up to this date (any format that is accepted by momentjs)<br/>* Provide the param 'to_block' or 'to_date'<br/>* If 'to_date' and 'to_block' are provided, 'to_block' will be used.<br/> | | | "" |
| offset | int | offset | | | 0 |
| cursor | str | The cursor returned in the previous response (used for getting the next page). | | | "" |
| limit | int | The desired page size of the result. | | | 0 |
| cursor | str | The cursor returned in the previous response (used for getting the next page). | | | "" |

Expand Down
70 changes: 4 additions & 66 deletions src/openapi_evm_api/model/block_token_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,70 +151,14 @@ def __new__(
_configuration=_configuration,
**kwargs,
)


class token_transfers(
schemas.DictSchema
):


class MetaOapg:
required = {
"total",
}

class properties:
total = schemas.StrSchema
__annotations__ = {
"total": total,
}

total: MetaOapg.properties.total

@typing.overload
def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ...

@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...

def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", ], str]):
# dict_instance[name] accessor
return super().__getitem__(name)


@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ...

@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...

def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", ], str]):
return super().get_item_oapg(name)


def __new__(
cls,
*args: typing.Union[dict, frozendict.frozendict, ],
total: typing.Union[MetaOapg.properties.total, str, ],
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
) -> 'token_transfers':
return super().__new__(
cls,
*args,
total=total,
_configuration=_configuration,
**kwargs,
)
__annotations__ = {
"transactions": transactions,
"nft_transfers": nft_transfers,
"token_transfers": token_transfers,
}


nft_transfers: MetaOapg.properties.nft_transfers
token_transfers: MetaOapg.properties.token_transfers
token_transfers: schemas.AnyTypeSchema
transactions: MetaOapg.properties.transactions

@typing.overload
Expand All @@ -223,13 +167,10 @@ def __getitem__(self, name: typing_extensions.Literal["transactions"]) -> MetaOa
@typing.overload
def __getitem__(self, name: typing_extensions.Literal["nft_transfers"]) -> MetaOapg.properties.nft_transfers: ...

@typing.overload
def __getitem__(self, name: typing_extensions.Literal["token_transfers"]) -> MetaOapg.properties.token_transfers: ...

@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...

def __getitem__(self, name: typing.Union[typing_extensions.Literal["transactions", "nft_transfers", "token_transfers", ], str]):
def __getitem__(self, name: typing.Union[typing_extensions.Literal["transactions", "nft_transfers", ], str]):
# dict_instance[name] accessor
return super().__getitem__(name)

Expand All @@ -240,21 +181,18 @@ def get_item_oapg(self, name: typing_extensions.Literal["transactions"]) -> Meta
@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["nft_transfers"]) -> MetaOapg.properties.nft_transfers: ...

@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["token_transfers"]) -> MetaOapg.properties.token_transfers: ...

@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...

def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["transactions", "nft_transfers", "token_transfers", ], str]):
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["transactions", "nft_transfers", ], str]):
return super().get_item_oapg(name)


def __new__(
cls,
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
nft_transfers: typing.Union[MetaOapg.properties.nft_transfers, dict, frozendict.frozendict, ],
token_transfers: typing.Union[MetaOapg.properties.token_transfers, dict, frozendict.frozendict, ],
token_transfers: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
transactions: typing.Union[MetaOapg.properties.transactions, dict, frozendict.frozendict, ],
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
Expand Down
70 changes: 4 additions & 66 deletions src/openapi_evm_api/model/block_token_stat.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -151,70 +151,14 @@ class BlockTokenStat(
_configuration=_configuration,
**kwargs,
)


class token_transfers(
schemas.DictSchema
):


class MetaOapg:
required = {
"total",
}

class properties:
total = schemas.StrSchema
__annotations__ = {
"total": total,
}

total: MetaOapg.properties.total

@typing.overload
def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ...

@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...

def __getitem__(self, name: typing.Union[typing_extensions.Literal["total", ], str]):
# dict_instance[name] accessor
return super().__getitem__(name)


@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ...

@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...

def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["total", ], str]):
return super().get_item_oapg(name)


def __new__(
cls,
*args: typing.Union[dict, frozendict.frozendict, ],
total: typing.Union[MetaOapg.properties.total, str, ],
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
) -> 'token_transfers':
return super().__new__(
cls,
*args,
total=total,
_configuration=_configuration,
**kwargs,
)
__annotations__ = {
"transactions": transactions,
"nft_transfers": nft_transfers,
"token_transfers": token_transfers,
}


nft_transfers: MetaOapg.properties.nft_transfers
token_transfers: MetaOapg.properties.token_transfers
token_transfers: schemas.AnyTypeSchema
transactions: MetaOapg.properties.transactions

@typing.overload
Expand All @@ -223,13 +167,10 @@ class BlockTokenStat(
@typing.overload
def __getitem__(self, name: typing_extensions.Literal["nft_transfers"]) -> MetaOapg.properties.nft_transfers: ...

@typing.overload
def __getitem__(self, name: typing_extensions.Literal["token_transfers"]) -> MetaOapg.properties.token_transfers: ...

@typing.overload
def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...

def __getitem__(self, name: typing.Union[typing_extensions.Literal["transactions", "nft_transfers", "token_transfers", ], str]):
def __getitem__(self, name: typing.Union[typing_extensions.Literal["transactions", "nft_transfers", ], str]):
# dict_instance[name] accessor
return super().__getitem__(name)

Expand All @@ -240,21 +181,18 @@ class BlockTokenStat(
@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["nft_transfers"]) -> MetaOapg.properties.nft_transfers: ...

@typing.overload
def get_item_oapg(self, name: typing_extensions.Literal["token_transfers"]) -> MetaOapg.properties.token_transfers: ...

@typing.overload
def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...

def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["transactions", "nft_transfers", "token_transfers", ], str]):
def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["transactions", "nft_transfers", ], str]):
return super().get_item_oapg(name)


def __new__(
cls,
*args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
nft_transfers: typing.Union[MetaOapg.properties.nft_transfers, dict, frozendict.frozendict, ],
token_transfers: typing.Union[MetaOapg.properties.token_transfers, dict, frozendict.frozendict, ],
token_transfers: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
transactions: typing.Union[MetaOapg.properties.transactions, dict, frozendict.frozendict, ],
_configuration: typing.Optional[schemas.Configuration] = None,
**kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
Expand Down
13 changes: 2 additions & 11 deletions src/openapi_evm_api/paths/address_events/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class OffsetSchema(

class MetaOapg:
inclusive_minimum = 0
CursorSchema = schemas.StrSchema


class LimitSchema(
Expand All @@ -88,7 +87,6 @@ class MetaOapg:
'from_date': typing.Union[FromDateSchema, str, ],
'to_date': typing.Union[ToDateSchema, str, ],
'offset': typing.Union[OffsetSchema, decimal.Decimal, int, ],
'cursor': typing.Union[CursorSchema, str, ],
'limit': typing.Union[LimitSchema, decimal.Decimal, int, ],
'cursor': typing.Union[CursorSchema, str, ],
},
Expand Down Expand Up @@ -143,19 +141,13 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams)
schema=OffsetSchema,
explode=True,
)
request_query_cursor = api_client.QueryParameter(
name="cursor",
style=api_client.ParameterStyle.FORM,
schema=CursorSchema,
explode=True,
)
request_query_limit = api_client.QueryParameter(
name="limit",
style=api_client.ParameterStyle.FORM,
schema=LimitSchema,
explode=True,
)
request_query_cursor2 = api_client.QueryParameter(
request_query_cursor = api_client.QueryParameter(
name="cursor",
style=api_client.ParameterStyle.FORM,
schema=CursorSchema,
Expand Down Expand Up @@ -431,9 +423,8 @@ class instances
request_query_to_date,
request_query_topic,
request_query_offset,
request_query_cursor,
request_query_limit,
request_query_cursor2,
request_query_cursor,
):
parameter_data = query_params.get(parameter.name, schemas.unset)
if parameter_data is schemas.unset:
Expand Down
13 changes: 2 additions & 11 deletions src/openapi_evm_api/paths/address_events/post.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class OffsetSchema(
schemas.IntSchema
):
pass
CursorSchema = schemas.StrSchema


class LimitSchema(
Expand All @@ -74,7 +73,6 @@ RequestOptionalQueryParams = typing_extensions.TypedDict(
'from_date': typing.Union[FromDateSchema, str, ],
'to_date': typing.Union[ToDateSchema, str, ],
'offset': typing.Union[OffsetSchema, decimal.Decimal, int, ],
'cursor': typing.Union[CursorSchema, str, ],
'limit': typing.Union[LimitSchema, decimal.Decimal, int, ],
'cursor': typing.Union[CursorSchema, str, ],
},
Expand Down Expand Up @@ -129,19 +127,13 @@ request_query_offset = api_client.QueryParameter(
schema=OffsetSchema,
explode=True,
)
request_query_cursor = api_client.QueryParameter(
name="cursor",
style=api_client.ParameterStyle.FORM,
schema=CursorSchema,
explode=True,
)
request_query_limit = api_client.QueryParameter(
name="limit",
style=api_client.ParameterStyle.FORM,
schema=LimitSchema,
explode=True,
)
request_query_cursor2 = api_client.QueryParameter(
request_query_cursor = api_client.QueryParameter(
name="cursor",
style=api_client.ParameterStyle.FORM,
schema=CursorSchema,
Expand Down Expand Up @@ -411,9 +403,8 @@ class BaseApi(api_client.Api):
request_query_to_date,
request_query_topic,
request_query_offset,
request_query_cursor,
request_query_limit,
request_query_cursor2,
request_query_cursor,
):
parameter_data = query_params.get(parameter.name, schemas.unset)
if parameter_data is schemas.unset:
Expand Down

0 comments on commit 31050a1

Please sign in to comment.