Skip to content

Commit cd4782d

Browse files
feat(api): api update
1 parent f58d93d commit cd4782d

File tree

6 files changed

+5
-147
lines changed

6 files changed

+5
-147
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 12
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-b60a3e75b9b6d64bb82b80cbf544f414f618a4c7f881220d8d8accd77b117e44.yml
3-
openapi_spec_hash: 84d972259e24260e09ec3c07612c55ed
1+
configured_endpoints: 11
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-c57750052aa770c1f554e81b2fcdaf9e4c4d2524a0cec568edbee560fde44dde.yml
3+
openapi_spec_hash: 3adaefca8d4d5c84ee4106e8ba10cabb
44
config_hash: 8477e3ee6fd596ab6ac911d052e4de79

api.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,10 @@ Methods:
5151
Types:
5252

5353
```python
54-
from supermemory.types import (
55-
ConnectionCreateResponse,
56-
ConnectionListResponse,
57-
ConnectionGetResponse,
58-
)
54+
from supermemory.types import ConnectionCreateResponse, ConnectionGetResponse
5955
```
6056

6157
Methods:
6258

6359
- <code title="post /v3/connections/{provider}">client.connections.<a href="./src/supermemory/resources/connections.py">create</a>(provider, \*\*<a href="src/supermemory/types/connection_create_params.py">params</a>) -> <a href="./src/supermemory/types/connection_create_response.py">ConnectionCreateResponse</a></code>
64-
- <code title="get /v3/connections">client.connections.<a href="./src/supermemory/resources/connections.py">list</a>() -> <a href="./src/supermemory/types/connection_list_response.py">ConnectionListResponse</a></code>
6560
- <code title="get /v3/connections/{connectionId}">client.connections.<a href="./src/supermemory/resources/connections.py">get</a>(connection_id) -> <a href="./src/supermemory/types/connection_get_response.py">ConnectionGetResponse</a></code>

src/supermemory/resources/connections.py

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
)
2121
from .._base_client import make_request_options
2222
from ..types.connection_get_response import ConnectionGetResponse
23-
from ..types.connection_list_response import ConnectionListResponse
2423
from ..types.connection_create_response import ConnectionCreateResponse
2524

2625
__all__ = ["ConnectionsResource", "AsyncConnectionsResource"]
@@ -90,25 +89,6 @@ def create(
9089
cast_to=ConnectionCreateResponse,
9190
)
9291

93-
def list(
94-
self,
95-
*,
96-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
97-
# The extra values given here take precedence over values defined on the client or passed to this method.
98-
extra_headers: Headers | None = None,
99-
extra_query: Query | None = None,
100-
extra_body: Body | None = None,
101-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
102-
) -> ConnectionListResponse:
103-
"""List all connections"""
104-
return self._get(
105-
"/v3/connections",
106-
options=make_request_options(
107-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
108-
),
109-
cast_to=ConnectionListResponse,
110-
)
111-
11292
def get(
11393
self,
11494
connection_id: str,
@@ -207,25 +187,6 @@ async def create(
207187
cast_to=ConnectionCreateResponse,
208188
)
209189

210-
async def list(
211-
self,
212-
*,
213-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
214-
# The extra values given here take precedence over values defined on the client or passed to this method.
215-
extra_headers: Headers | None = None,
216-
extra_query: Query | None = None,
217-
extra_body: Body | None = None,
218-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
219-
) -> ConnectionListResponse:
220-
"""List all connections"""
221-
return await self._get(
222-
"/v3/connections",
223-
options=make_request_options(
224-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
225-
),
226-
cast_to=ConnectionListResponse,
227-
)
228-
229190
async def get(
230191
self,
231192
connection_id: str,
@@ -267,9 +228,6 @@ def __init__(self, connections: ConnectionsResource) -> None:
267228
self.create = to_raw_response_wrapper(
268229
connections.create,
269230
)
270-
self.list = to_raw_response_wrapper(
271-
connections.list,
272-
)
273231
self.get = to_raw_response_wrapper(
274232
connections.get,
275233
)
@@ -282,9 +240,6 @@ def __init__(self, connections: AsyncConnectionsResource) -> None:
282240
self.create = async_to_raw_response_wrapper(
283241
connections.create,
284242
)
285-
self.list = async_to_raw_response_wrapper(
286-
connections.list,
287-
)
288243
self.get = async_to_raw_response_wrapper(
289244
connections.get,
290245
)
@@ -297,9 +252,6 @@ def __init__(self, connections: ConnectionsResource) -> None:
297252
self.create = to_streamed_response_wrapper(
298253
connections.create,
299254
)
300-
self.list = to_streamed_response_wrapper(
301-
connections.list,
302-
)
303255
self.get = to_streamed_response_wrapper(
304256
connections.get,
305257
)
@@ -312,9 +264,6 @@ def __init__(self, connections: AsyncConnectionsResource) -> None:
312264
self.create = async_to_streamed_response_wrapper(
313265
connections.create,
314266
)
315-
self.list = async_to_streamed_response_wrapper(
316-
connections.list,
317-
)
318267
self.get = async_to_streamed_response_wrapper(
319268
connections.get,
320269
)

src/supermemory/types/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from .search_execute_response import SearchExecuteResponse as SearchExecuteResponse
1717
from .setting_update_response import SettingUpdateResponse as SettingUpdateResponse
1818
from .connection_create_params import ConnectionCreateParams as ConnectionCreateParams
19-
from .connection_list_response import ConnectionListResponse as ConnectionListResponse
2019
from .memory_upload_file_params import MemoryUploadFileParams as MemoryUploadFileParams
2120
from .connection_create_response import ConnectionCreateResponse as ConnectionCreateResponse
2221
from .memory_upload_file_response import MemoryUploadFileResponse as MemoryUploadFileResponse

src/supermemory/types/connection_list_response.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

tests/api_resources/test_connections.py

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99

1010
from supermemory import Supermemory, AsyncSupermemory
1111
from tests.utils import assert_matches_type
12-
from supermemory.types import (
13-
ConnectionGetResponse,
14-
ConnectionListResponse,
15-
ConnectionCreateResponse,
16-
)
12+
from supermemory.types import ConnectionGetResponse, ConnectionCreateResponse
1713

1814
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
1915

@@ -66,34 +62,6 @@ def test_streaming_response_create(self, client: Supermemory) -> None:
6662

6763
assert cast(Any, response.is_closed) is True
6864

69-
@pytest.mark.skip()
70-
@parametrize
71-
def test_method_list(self, client: Supermemory) -> None:
72-
connection = client.connections.list()
73-
assert_matches_type(ConnectionListResponse, connection, path=["response"])
74-
75-
@pytest.mark.skip()
76-
@parametrize
77-
def test_raw_response_list(self, client: Supermemory) -> None:
78-
response = client.connections.with_raw_response.list()
79-
80-
assert response.is_closed is True
81-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
82-
connection = response.parse()
83-
assert_matches_type(ConnectionListResponse, connection, path=["response"])
84-
85-
@pytest.mark.skip()
86-
@parametrize
87-
def test_streaming_response_list(self, client: Supermemory) -> None:
88-
with client.connections.with_streaming_response.list() as response:
89-
assert not response.is_closed
90-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
91-
92-
connection = response.parse()
93-
assert_matches_type(ConnectionListResponse, connection, path=["response"])
94-
95-
assert cast(Any, response.is_closed) is True
96-
9765
@pytest.mark.skip()
9866
@parametrize
9967
def test_method_get(self, client: Supermemory) -> None:
@@ -185,34 +153,6 @@ async def test_streaming_response_create(self, async_client: AsyncSupermemory) -
185153

186154
assert cast(Any, response.is_closed) is True
187155

188-
@pytest.mark.skip()
189-
@parametrize
190-
async def test_method_list(self, async_client: AsyncSupermemory) -> None:
191-
connection = await async_client.connections.list()
192-
assert_matches_type(ConnectionListResponse, connection, path=["response"])
193-
194-
@pytest.mark.skip()
195-
@parametrize
196-
async def test_raw_response_list(self, async_client: AsyncSupermemory) -> None:
197-
response = await async_client.connections.with_raw_response.list()
198-
199-
assert response.is_closed is True
200-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
201-
connection = await response.parse()
202-
assert_matches_type(ConnectionListResponse, connection, path=["response"])
203-
204-
@pytest.mark.skip()
205-
@parametrize
206-
async def test_streaming_response_list(self, async_client: AsyncSupermemory) -> None:
207-
async with async_client.connections.with_streaming_response.list() as response:
208-
assert not response.is_closed
209-
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
210-
211-
connection = await response.parse()
212-
assert_matches_type(ConnectionListResponse, connection, path=["response"])
213-
214-
assert cast(Any, response.is_closed) is True
215-
216156
@pytest.mark.skip()
217157
@parametrize
218158
async def test_method_get(self, async_client: AsyncSupermemory) -> None:

0 commit comments

Comments
 (0)