diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 10f3091..6b7b74c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.2.0" + ".": "0.3.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 9f90917..b33261c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 50 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-cd88dd75403e620991c3659cd7e9278f9c8c439f3857c25db8634dfc7e77a9b9.yml -openapi_spec_hash: 35a0cbd0262458d633e38fc5ba442118 -config_hash: a79df81e5bba11abab18a84163248141 +configured_endpoints: 49 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-cd6572e5c8f35a293af2a1dae3e41c63da19dad8d2ab456a7322a09614de3ae9.yml +openapi_spec_hash: 68dd5648c3ee92f07f52c5d4ebf2f8fc +config_hash: 27aff5f3f84397a9b3c2cb8a3c1d1e71 diff --git a/CHANGELOG.md b/CHANGELOG.md index 57d66bf..25f6dbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.3.0 (2026-04-04) + +Full Changelog: [v0.2.0...v0.3.0](https://github.com/cryptechdev/neptune-api-v2-python/compare/v0.2.0...v0.3.0) + +### Features + +* **api:** api update ([bf139f9](https://github.com/cryptechdev/neptune-api-v2-python/commit/bf139f9f726989199d7838e8194aca5245fd8842)) +* **api:** remove bantr integration endpoint ([5271ab6](https://github.com/cryptechdev/neptune-api-v2-python/commit/5271ab6f22c8b68e451cb7ada4ff3c7e587f8232)) + ## 0.2.0 (2026-04-03) Full Changelog: [v0.1.0...v0.2.0](https://github.com/cryptechdev/neptune-api-v2-python/compare/v0.1.0...v0.2.0) diff --git a/api.md b/api.md index cc66777..c89631f 100644 --- a/api.md +++ b/api.md @@ -389,20 +389,6 @@ Methods: - client.analytics.nept.unlocks_distribution(\*\*params) -> NeptUnlocksDistributionResponse -# Integrations - -## Bantr - -Types: - -```python -from neptune_api_v2.types.integrations import BantrGetTransactionsResponse -``` - -Methods: - -- client.integrations.bantr.get_transactions(\*\*params) -> BantrGetTransactionsResponse - # Swap ## Routes diff --git a/pyproject.toml b/pyproject.toml index 647d5f3..bb10197 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "neptune_api_v2" -version = "0.2.0" +version = "0.3.0" description = "The official Python library for the neptune-api-v2 API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/neptune_api_v2/_client.py b/src/neptune_api_v2/_client.py index c688768..2fea046 100644 --- a/src/neptune_api_v2/_client.py +++ b/src/neptune_api_v2/_client.py @@ -31,7 +31,7 @@ ) if TYPE_CHECKING: - from .resources import nept, swap, user, assets, status, markets, analytics, integrations + from .resources import nept, swap, user, assets, status, markets, analytics from .resources.nept import NeptResource, AsyncNeptResource from .resources.assets import AssetsResource, AsyncAssetsResource from .resources.status import StatusResource, AsyncStatusResource @@ -39,7 +39,6 @@ from .resources.user.user import UserResource, AsyncUserResource from .resources.markets.markets import MarketsResource, AsyncMarketsResource from .resources.analytics.analytics import AnalyticsResource, AsyncAnalyticsResource - from .resources.integrations.integrations import IntegrationsResource, AsyncIntegrationsResource __all__ = [ "Timeout", @@ -131,12 +130,6 @@ def analytics(self) -> AnalyticsResource: return AnalyticsResource(self) - @cached_property - def integrations(self) -> IntegrationsResource: - from .resources.integrations import IntegrationsResource - - return IntegrationsResource(self) - @cached_property def swap(self) -> SwapResource: from .resources.swap import SwapResource @@ -326,12 +319,6 @@ def analytics(self) -> AsyncAnalyticsResource: return AsyncAnalyticsResource(self) - @cached_property - def integrations(self) -> AsyncIntegrationsResource: - from .resources.integrations import AsyncIntegrationsResource - - return AsyncIntegrationsResource(self) - @cached_property def swap(self) -> AsyncSwapResource: from .resources.swap import AsyncSwapResource @@ -485,12 +472,6 @@ def analytics(self) -> analytics.AnalyticsResourceWithRawResponse: return AnalyticsResourceWithRawResponse(self._client.analytics) - @cached_property - def integrations(self) -> integrations.IntegrationsResourceWithRawResponse: - from .resources.integrations import IntegrationsResourceWithRawResponse - - return IntegrationsResourceWithRawResponse(self._client.integrations) - @cached_property def swap(self) -> swap.SwapResourceWithRawResponse: from .resources.swap import SwapResourceWithRawResponse @@ -540,12 +521,6 @@ def analytics(self) -> analytics.AsyncAnalyticsResourceWithRawResponse: return AsyncAnalyticsResourceWithRawResponse(self._client.analytics) - @cached_property - def integrations(self) -> integrations.AsyncIntegrationsResourceWithRawResponse: - from .resources.integrations import AsyncIntegrationsResourceWithRawResponse - - return AsyncIntegrationsResourceWithRawResponse(self._client.integrations) - @cached_property def swap(self) -> swap.AsyncSwapResourceWithRawResponse: from .resources.swap import AsyncSwapResourceWithRawResponse @@ -595,12 +570,6 @@ def analytics(self) -> analytics.AnalyticsResourceWithStreamingResponse: return AnalyticsResourceWithStreamingResponse(self._client.analytics) - @cached_property - def integrations(self) -> integrations.IntegrationsResourceWithStreamingResponse: - from .resources.integrations import IntegrationsResourceWithStreamingResponse - - return IntegrationsResourceWithStreamingResponse(self._client.integrations) - @cached_property def swap(self) -> swap.SwapResourceWithStreamingResponse: from .resources.swap import SwapResourceWithStreamingResponse @@ -650,12 +619,6 @@ def analytics(self) -> analytics.AsyncAnalyticsResourceWithStreamingResponse: return AsyncAnalyticsResourceWithStreamingResponse(self._client.analytics) - @cached_property - def integrations(self) -> integrations.AsyncIntegrationsResourceWithStreamingResponse: - from .resources.integrations import AsyncIntegrationsResourceWithStreamingResponse - - return AsyncIntegrationsResourceWithStreamingResponse(self._client.integrations) - @cached_property def swap(self) -> swap.AsyncSwapResourceWithStreamingResponse: from .resources.swap import AsyncSwapResourceWithStreamingResponse diff --git a/src/neptune_api_v2/_version.py b/src/neptune_api_v2/_version.py index 35454df..c00dd36 100644 --- a/src/neptune_api_v2/_version.py +++ b/src/neptune_api_v2/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "neptune_api_v2" -__version__ = "0.2.0" # x-release-please-version +__version__ = "0.3.0" # x-release-please-version diff --git a/src/neptune_api_v2/resources/__init__.py b/src/neptune_api_v2/resources/__init__.py index b40c1e0..5c00289 100644 --- a/src/neptune_api_v2/resources/__init__.py +++ b/src/neptune_api_v2/resources/__init__.py @@ -56,14 +56,6 @@ AnalyticsResourceWithStreamingResponse, AsyncAnalyticsResourceWithStreamingResponse, ) -from .integrations import ( - IntegrationsResource, - AsyncIntegrationsResource, - IntegrationsResourceWithRawResponse, - AsyncIntegrationsResourceWithRawResponse, - IntegrationsResourceWithStreamingResponse, - AsyncIntegrationsResourceWithStreamingResponse, -) __all__ = [ "StatusResource", @@ -102,12 +94,6 @@ "AsyncAnalyticsResourceWithRawResponse", "AnalyticsResourceWithStreamingResponse", "AsyncAnalyticsResourceWithStreamingResponse", - "IntegrationsResource", - "AsyncIntegrationsResource", - "IntegrationsResourceWithRawResponse", - "AsyncIntegrationsResourceWithRawResponse", - "IntegrationsResourceWithStreamingResponse", - "AsyncIntegrationsResourceWithStreamingResponse", "SwapResource", "AsyncSwapResource", "SwapResourceWithRawResponse", diff --git a/src/neptune_api_v2/resources/integrations/__init__.py b/src/neptune_api_v2/resources/integrations/__init__.py deleted file mode 100644 index 5053ea5..0000000 --- a/src/neptune_api_v2/resources/integrations/__init__.py +++ /dev/null @@ -1,33 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from .bantr import ( - BantrResource, - AsyncBantrResource, - BantrResourceWithRawResponse, - AsyncBantrResourceWithRawResponse, - BantrResourceWithStreamingResponse, - AsyncBantrResourceWithStreamingResponse, -) -from .integrations import ( - IntegrationsResource, - AsyncIntegrationsResource, - IntegrationsResourceWithRawResponse, - AsyncIntegrationsResourceWithRawResponse, - IntegrationsResourceWithStreamingResponse, - AsyncIntegrationsResourceWithStreamingResponse, -) - -__all__ = [ - "BantrResource", - "AsyncBantrResource", - "BantrResourceWithRawResponse", - "AsyncBantrResourceWithRawResponse", - "BantrResourceWithStreamingResponse", - "AsyncBantrResourceWithStreamingResponse", - "IntegrationsResource", - "AsyncIntegrationsResource", - "IntegrationsResourceWithRawResponse", - "AsyncIntegrationsResourceWithRawResponse", - "IntegrationsResourceWithStreamingResponse", - "AsyncIntegrationsResourceWithStreamingResponse", -] diff --git a/src/neptune_api_v2/resources/integrations/bantr.py b/src/neptune_api_v2/resources/integrations/bantr.py deleted file mode 100644 index 0b36876..0000000 --- a/src/neptune_api_v2/resources/integrations/bantr.py +++ /dev/null @@ -1,201 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Optional - -import httpx - -from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.integrations import bantr_get_transactions_params -from ...types.integrations.bantr_get_transactions_response import BantrGetTransactionsResponse - -__all__ = ["BantrResource", "AsyncBantrResource"] - - -class BantrResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> BantrResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers - """ - return BantrResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> BantrResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response - """ - return BantrResourceWithStreamingResponse(self) - - def get_transactions( - self, - *, - end_block: int, - start_block: int, - limit: Optional[int] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BantrGetTransactionsResponse: - """ - . - - Args: - end_block: End block - - start_block: Start Block - - limit: Pagination limit - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get( - "/api/v1/integrations/bantr/transactions", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "end_block": end_block, - "start_block": start_block, - "limit": limit, - }, - bantr_get_transactions_params.BantrGetTransactionsParams, - ), - ), - cast_to=BantrGetTransactionsResponse, - ) - - -class AsyncBantrResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncBantrResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers - """ - return AsyncBantrResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncBantrResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response - """ - return AsyncBantrResourceWithStreamingResponse(self) - - async def get_transactions( - self, - *, - end_block: int, - start_block: int, - limit: Optional[int] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BantrGetTransactionsResponse: - """ - . - - Args: - end_block: End block - - start_block: Start Block - - limit: Pagination limit - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return await self._get( - "/api/v1/integrations/bantr/transactions", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - { - "end_block": end_block, - "start_block": start_block, - "limit": limit, - }, - bantr_get_transactions_params.BantrGetTransactionsParams, - ), - ), - cast_to=BantrGetTransactionsResponse, - ) - - -class BantrResourceWithRawResponse: - def __init__(self, bantr: BantrResource) -> None: - self._bantr = bantr - - self.get_transactions = to_raw_response_wrapper( - bantr.get_transactions, - ) - - -class AsyncBantrResourceWithRawResponse: - def __init__(self, bantr: AsyncBantrResource) -> None: - self._bantr = bantr - - self.get_transactions = async_to_raw_response_wrapper( - bantr.get_transactions, - ) - - -class BantrResourceWithStreamingResponse: - def __init__(self, bantr: BantrResource) -> None: - self._bantr = bantr - - self.get_transactions = to_streamed_response_wrapper( - bantr.get_transactions, - ) - - -class AsyncBantrResourceWithStreamingResponse: - def __init__(self, bantr: AsyncBantrResource) -> None: - self._bantr = bantr - - self.get_transactions = async_to_streamed_response_wrapper( - bantr.get_transactions, - ) diff --git a/src/neptune_api_v2/resources/integrations/integrations.py b/src/neptune_api_v2/resources/integrations/integrations.py deleted file mode 100644 index 7a56c8e..0000000 --- a/src/neptune_api_v2/resources/integrations/integrations.py +++ /dev/null @@ -1,102 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from .bantr import ( - BantrResource, - AsyncBantrResource, - BantrResourceWithRawResponse, - AsyncBantrResourceWithRawResponse, - BantrResourceWithStreamingResponse, - AsyncBantrResourceWithStreamingResponse, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource - -__all__ = ["IntegrationsResource", "AsyncIntegrationsResource"] - - -class IntegrationsResource(SyncAPIResource): - @cached_property - def bantr(self) -> BantrResource: - return BantrResource(self._client) - - @cached_property - def with_raw_response(self) -> IntegrationsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers - """ - return IntegrationsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> IntegrationsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response - """ - return IntegrationsResourceWithStreamingResponse(self) - - -class AsyncIntegrationsResource(AsyncAPIResource): - @cached_property - def bantr(self) -> AsyncBantrResource: - return AsyncBantrResource(self._client) - - @cached_property - def with_raw_response(self) -> AsyncIntegrationsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#accessing-raw-response-data-eg-headers - """ - return AsyncIntegrationsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncIntegrationsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/cryptechdev/neptune-api-v2-python#with_streaming_response - """ - return AsyncIntegrationsResourceWithStreamingResponse(self) - - -class IntegrationsResourceWithRawResponse: - def __init__(self, integrations: IntegrationsResource) -> None: - self._integrations = integrations - - @cached_property - def bantr(self) -> BantrResourceWithRawResponse: - return BantrResourceWithRawResponse(self._integrations.bantr) - - -class AsyncIntegrationsResourceWithRawResponse: - def __init__(self, integrations: AsyncIntegrationsResource) -> None: - self._integrations = integrations - - @cached_property - def bantr(self) -> AsyncBantrResourceWithRawResponse: - return AsyncBantrResourceWithRawResponse(self._integrations.bantr) - - -class IntegrationsResourceWithStreamingResponse: - def __init__(self, integrations: IntegrationsResource) -> None: - self._integrations = integrations - - @cached_property - def bantr(self) -> BantrResourceWithStreamingResponse: - return BantrResourceWithStreamingResponse(self._integrations.bantr) - - -class AsyncIntegrationsResourceWithStreamingResponse: - def __init__(self, integrations: AsyncIntegrationsResource) -> None: - self._integrations = integrations - - @cached_property - def bantr(self) -> AsyncBantrResourceWithStreamingResponse: - return AsyncBantrResourceWithStreamingResponse(self._integrations.bantr) diff --git a/src/neptune_api_v2/types/integrations/__init__.py b/src/neptune_api_v2/types/integrations/__init__.py deleted file mode 100644 index 71ceac8..0000000 --- a/src/neptune_api_v2/types/integrations/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from .bantr_get_transactions_params import BantrGetTransactionsParams as BantrGetTransactionsParams -from .bantr_get_transactions_response import BantrGetTransactionsResponse as BantrGetTransactionsResponse diff --git a/src/neptune_api_v2/types/integrations/bantr_get_transactions_params.py b/src/neptune_api_v2/types/integrations/bantr_get_transactions_params.py deleted file mode 100644 index e9d2967..0000000 --- a/src/neptune_api_v2/types/integrations/bantr_get_transactions_params.py +++ /dev/null @@ -1,19 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Optional -from typing_extensions import Required, TypedDict - -__all__ = ["BantrGetTransactionsParams"] - - -class BantrGetTransactionsParams(TypedDict, total=False): - end_block: Required[int] - """End block""" - - start_block: Required[int] - """Start Block""" - - limit: Optional[int] - """Pagination limit""" diff --git a/src/neptune_api_v2/types/integrations/bantr_get_transactions_response.py b/src/neptune_api_v2/types/integrations/bantr_get_transactions_response.py deleted file mode 100644 index dc09d44..0000000 --- a/src/neptune_api_v2/types/integrations/bantr_get_transactions_response.py +++ /dev/null @@ -1,47 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from ..._models import BaseModel - -__all__ = ["BantrGetTransactionsResponse", "Data", "Error"] - - -class Data(BaseModel): - action: str - """The type of action (e.g., lend, borrow).""" - - block: int - """The block number where the transaction was""" - - tokens_amount_in_usd: Optional[str] = None - """Value of tokens sent into the transaction in USD.""" - - tokens_amount_out_usd: Optional[str] = None - """Value of tokens received from the transaction in USD.""" - - txn_hash: str - """The transaction hash.""" - - unique_foreign_txn_id: str - """A unique identifier for the transaction from your system""" - - user_address: str - """The wallet address of the user.""" - - volume_usd: Optional[str] = None - """Total transaction volume in USD.""" - - -class Error(BaseModel): - code: str - - message: str - - -class BantrGetTransactionsResponse(BaseModel): - data: Optional[List[Data]] = None - - error: Optional[Error] = None - - success: bool diff --git a/tests/api_resources/integrations/__init__.py b/tests/api_resources/integrations/__init__.py deleted file mode 100644 index fd8019a..0000000 --- a/tests/api_resources/integrations/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/integrations/test_bantr.py b/tests/api_resources/integrations/test_bantr.py deleted file mode 100644 index a90c2ab..0000000 --- a/tests/api_resources/integrations/test_bantr.py +++ /dev/null @@ -1,118 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from tests.utils import assert_matches_type -from neptune_api_v2 import NeptuneAPIV2, AsyncNeptuneAPIV2 -from neptune_api_v2.types.integrations import BantrGetTransactionsResponse - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestBantr: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_method_get_transactions(self, client: NeptuneAPIV2) -> None: - bantr = client.integrations.bantr.get_transactions( - end_block=0, - start_block=0, - ) - assert_matches_type(BantrGetTransactionsResponse, bantr, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_method_get_transactions_with_all_params(self, client: NeptuneAPIV2) -> None: - bantr = client.integrations.bantr.get_transactions( - end_block=0, - start_block=0, - limit=0, - ) - assert_matches_type(BantrGetTransactionsResponse, bantr, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_raw_response_get_transactions(self, client: NeptuneAPIV2) -> None: - response = client.integrations.bantr.with_raw_response.get_transactions( - end_block=0, - start_block=0, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bantr = response.parse() - assert_matches_type(BantrGetTransactionsResponse, bantr, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_streaming_response_get_transactions(self, client: NeptuneAPIV2) -> None: - with client.integrations.bantr.with_streaming_response.get_transactions( - end_block=0, - start_block=0, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - bantr = response.parse() - assert_matches_type(BantrGetTransactionsResponse, bantr, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncBantr: - parametrize = pytest.mark.parametrize( - "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] - ) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_method_get_transactions(self, async_client: AsyncNeptuneAPIV2) -> None: - bantr = await async_client.integrations.bantr.get_transactions( - end_block=0, - start_block=0, - ) - assert_matches_type(BantrGetTransactionsResponse, bantr, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_method_get_transactions_with_all_params(self, async_client: AsyncNeptuneAPIV2) -> None: - bantr = await async_client.integrations.bantr.get_transactions( - end_block=0, - start_block=0, - limit=0, - ) - assert_matches_type(BantrGetTransactionsResponse, bantr, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_raw_response_get_transactions(self, async_client: AsyncNeptuneAPIV2) -> None: - response = await async_client.integrations.bantr.with_raw_response.get_transactions( - end_block=0, - start_block=0, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bantr = await response.parse() - assert_matches_type(BantrGetTransactionsResponse, bantr, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_streaming_response_get_transactions(self, async_client: AsyncNeptuneAPIV2) -> None: - async with async_client.integrations.bantr.with_streaming_response.get_transactions( - end_block=0, - start_block=0, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - bantr = await response.parse() - assert_matches_type(BantrGetTransactionsResponse, bantr, path=["response"]) - - assert cast(Any, response.is_closed) is True