Skip to content

Commit 3209287

Browse files
feat(api): api update
1 parent f38e029 commit 3209287

File tree

11 files changed

+125
-145
lines changed

11 files changed

+125
-145
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 18
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-86464130af6afb678b92cd7a412035fa95d0f806eb35d5cfc1902c0d417c44ca.yml
3-
openapi_spec_hash: 9df21af9ca1497c2a481936ba585290d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-3d350e6cd04452a1654fdb7a93fa7e8dbbf7706273ae7c21818efce9dcf9bbfe.yml
3+
openapi_spec_hash: 25beffd2761e5414d0cb32f74a969a38
44
config_hash: b3ca4ec5b02e5333af51ebc2e9fdef1b

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ from browserbase import Browserbase
134134
client = Browserbase()
135135

136136
session = client.sessions.create(
137-
project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
137+
project_id="projectId",
138138
browser_settings={},
139139
)
140140
print(session.browser_settings)

tests/api_resources/sessions/test_downloads.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ class TestDownloads:
2626
@parametrize
2727
@pytest.mark.respx(base_url=base_url)
2828
def test_method_list(self, client: Browserbase, respx_mock: MockRouter) -> None:
29-
respx_mock.get("/v1/sessions/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/downloads").mock(
30-
return_value=httpx.Response(200, json={"foo": "bar"})
31-
)
29+
respx_mock.get("/v1/sessions/id/downloads").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
3230
download = client.sessions.downloads.list(
33-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
31+
"id",
3432
)
3533
assert download.is_closed
3634
assert download.json() == {"foo": "bar"}
@@ -40,12 +38,10 @@ def test_method_list(self, client: Browserbase, respx_mock: MockRouter) -> None:
4038
@parametrize
4139
@pytest.mark.respx(base_url=base_url)
4240
def test_raw_response_list(self, client: Browserbase, respx_mock: MockRouter) -> None:
43-
respx_mock.get("/v1/sessions/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/downloads").mock(
44-
return_value=httpx.Response(200, json={"foo": "bar"})
45-
)
41+
respx_mock.get("/v1/sessions/id/downloads").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
4642

4743
download = client.sessions.downloads.with_raw_response.list(
48-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
44+
"id",
4945
)
5046

5147
assert download.is_closed is True
@@ -56,11 +52,9 @@ def test_raw_response_list(self, client: Browserbase, respx_mock: MockRouter) ->
5652
@parametrize
5753
@pytest.mark.respx(base_url=base_url)
5854
def test_streaming_response_list(self, client: Browserbase, respx_mock: MockRouter) -> None:
59-
respx_mock.get("/v1/sessions/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/downloads").mock(
60-
return_value=httpx.Response(200, json={"foo": "bar"})
61-
)
55+
respx_mock.get("/v1/sessions/id/downloads").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
6256
with client.sessions.downloads.with_streaming_response.list(
63-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
57+
"id",
6458
) as download:
6559
assert not download.is_closed
6660
assert download.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -88,11 +82,9 @@ class TestAsyncDownloads:
8882
@parametrize
8983
@pytest.mark.respx(base_url=base_url)
9084
async def test_method_list(self, async_client: AsyncBrowserbase, respx_mock: MockRouter) -> None:
91-
respx_mock.get("/v1/sessions/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/downloads").mock(
92-
return_value=httpx.Response(200, json={"foo": "bar"})
93-
)
85+
respx_mock.get("/v1/sessions/id/downloads").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
9486
download = await async_client.sessions.downloads.list(
95-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
87+
"id",
9688
)
9789
assert download.is_closed
9890
assert await download.json() == {"foo": "bar"}
@@ -102,12 +94,10 @@ async def test_method_list(self, async_client: AsyncBrowserbase, respx_mock: Moc
10294
@parametrize
10395
@pytest.mark.respx(base_url=base_url)
10496
async def test_raw_response_list(self, async_client: AsyncBrowserbase, respx_mock: MockRouter) -> None:
105-
respx_mock.get("/v1/sessions/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/downloads").mock(
106-
return_value=httpx.Response(200, json={"foo": "bar"})
107-
)
97+
respx_mock.get("/v1/sessions/id/downloads").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
10898

10999
download = await async_client.sessions.downloads.with_raw_response.list(
110-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
100+
"id",
111101
)
112102

113103
assert download.is_closed is True
@@ -118,11 +108,9 @@ async def test_raw_response_list(self, async_client: AsyncBrowserbase, respx_moc
118108
@parametrize
119109
@pytest.mark.respx(base_url=base_url)
120110
async def test_streaming_response_list(self, async_client: AsyncBrowserbase, respx_mock: MockRouter) -> None:
121-
respx_mock.get("/v1/sessions/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/downloads").mock(
122-
return_value=httpx.Response(200, json={"foo": "bar"})
123-
)
111+
respx_mock.get("/v1/sessions/id/downloads").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
124112
async with async_client.sessions.downloads.with_streaming_response.list(
125-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
113+
"id",
126114
) as download:
127115
assert not download.is_closed
128116
assert download.http_request.headers.get("X-Stainless-Lang") == "python"

tests/api_resources/sessions/test_logs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class TestLogs:
2020
@parametrize
2121
def test_method_list(self, client: Browserbase) -> None:
2222
log = client.sessions.logs.list(
23-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
23+
"id",
2424
)
2525
assert_matches_type(LogListResponse, log, path=["response"])
2626

2727
@parametrize
2828
def test_raw_response_list(self, client: Browserbase) -> None:
2929
response = client.sessions.logs.with_raw_response.list(
30-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
30+
"id",
3131
)
3232

3333
assert response.is_closed is True
@@ -38,7 +38,7 @@ def test_raw_response_list(self, client: Browserbase) -> None:
3838
@parametrize
3939
def test_streaming_response_list(self, client: Browserbase) -> None:
4040
with client.sessions.logs.with_streaming_response.list(
41-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
41+
"id",
4242
) as response:
4343
assert not response.is_closed
4444
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -64,14 +64,14 @@ class TestAsyncLogs:
6464
@parametrize
6565
async def test_method_list(self, async_client: AsyncBrowserbase) -> None:
6666
log = await async_client.sessions.logs.list(
67-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
67+
"id",
6868
)
6969
assert_matches_type(LogListResponse, log, path=["response"])
7070

7171
@parametrize
7272
async def test_raw_response_list(self, async_client: AsyncBrowserbase) -> None:
7373
response = await async_client.sessions.logs.with_raw_response.list(
74-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
74+
"id",
7575
)
7676

7777
assert response.is_closed is True
@@ -82,7 +82,7 @@ async def test_raw_response_list(self, async_client: AsyncBrowserbase) -> None:
8282
@parametrize
8383
async def test_streaming_response_list(self, async_client: AsyncBrowserbase) -> None:
8484
async with async_client.sessions.logs.with_streaming_response.list(
85-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
85+
"id",
8686
) as response:
8787
assert not response.is_closed
8888
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

tests/api_resources/sessions/test_recording.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class TestRecording:
2020
@parametrize
2121
def test_method_retrieve(self, client: Browserbase) -> None:
2222
recording = client.sessions.recording.retrieve(
23-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
23+
"id",
2424
)
2525
assert_matches_type(RecordingRetrieveResponse, recording, path=["response"])
2626

2727
@parametrize
2828
def test_raw_response_retrieve(self, client: Browserbase) -> None:
2929
response = client.sessions.recording.with_raw_response.retrieve(
30-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
30+
"id",
3131
)
3232

3333
assert response.is_closed is True
@@ -38,7 +38,7 @@ def test_raw_response_retrieve(self, client: Browserbase) -> None:
3838
@parametrize
3939
def test_streaming_response_retrieve(self, client: Browserbase) -> None:
4040
with client.sessions.recording.with_streaming_response.retrieve(
41-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
41+
"id",
4242
) as response:
4343
assert not response.is_closed
4444
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -64,14 +64,14 @@ class TestAsyncRecording:
6464
@parametrize
6565
async def test_method_retrieve(self, async_client: AsyncBrowserbase) -> None:
6666
recording = await async_client.sessions.recording.retrieve(
67-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
67+
"id",
6868
)
6969
assert_matches_type(RecordingRetrieveResponse, recording, path=["response"])
7070

7171
@parametrize
7272
async def test_raw_response_retrieve(self, async_client: AsyncBrowserbase) -> None:
7373
response = await async_client.sessions.recording.with_raw_response.retrieve(
74-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
74+
"id",
7575
)
7676

7777
assert response.is_closed is True
@@ -82,7 +82,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncBrowserbase) -> No
8282
@parametrize
8383
async def test_streaming_response_retrieve(self, async_client: AsyncBrowserbase) -> None:
8484
async with async_client.sessions.recording.with_streaming_response.retrieve(
85-
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
85+
"id",
8686
) as response:
8787
assert not response.is_closed
8888
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

tests/api_resources/sessions/test_uploads.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ class TestUploads:
2020
@parametrize
2121
def test_method_create(self, client: Browserbase) -> None:
2222
upload = client.sessions.uploads.create(
23-
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
23+
id="id",
2424
file=b"raw file contents",
2525
)
2626
assert_matches_type(UploadCreateResponse, upload, path=["response"])
2727

2828
@parametrize
2929
def test_raw_response_create(self, client: Browserbase) -> None:
3030
response = client.sessions.uploads.with_raw_response.create(
31-
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
31+
id="id",
3232
file=b"raw file contents",
3333
)
3434

@@ -40,7 +40,7 @@ def test_raw_response_create(self, client: Browserbase) -> None:
4040
@parametrize
4141
def test_streaming_response_create(self, client: Browserbase) -> None:
4242
with client.sessions.uploads.with_streaming_response.create(
43-
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
43+
id="id",
4444
file=b"raw file contents",
4545
) as response:
4646
assert not response.is_closed
@@ -68,15 +68,15 @@ class TestAsyncUploads:
6868
@parametrize
6969
async def test_method_create(self, async_client: AsyncBrowserbase) -> None:
7070
upload = await async_client.sessions.uploads.create(
71-
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
71+
id="id",
7272
file=b"raw file contents",
7373
)
7474
assert_matches_type(UploadCreateResponse, upload, path=["response"])
7575

7676
@parametrize
7777
async def test_raw_response_create(self, async_client: AsyncBrowserbase) -> None:
7878
response = await async_client.sessions.uploads.with_raw_response.create(
79-
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
79+
id="id",
8080
file=b"raw file contents",
8181
)
8282

@@ -88,7 +88,7 @@ async def test_raw_response_create(self, async_client: AsyncBrowserbase) -> None
8888
@parametrize
8989
async def test_streaming_response_create(self, async_client: AsyncBrowserbase) -> None:
9090
async with async_client.sessions.uploads.with_streaming_response.create(
91-
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
91+
id="id",
9292
file=b"raw file contents",
9393
) as response:
9494
assert not response.is_closed

0 commit comments

Comments
 (0)