Skip to content

Commit c6cba84

Browse files
feat(api): api update
1 parent f2b37bc commit c6cba84

4 files changed

Lines changed: 28 additions & 28 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 27
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-e864d762f50e49c0584bbf35eacc43cdb1397f805cca52cb8d4c07781739d0a3.yml
3-
openapi_spec_hash: f511fefb34946e5878ac17f2b3056b1f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api/moderation-api-3bb06bde0f76baa35ecc698b0c60371c9eadfd7b58c00b77cbc124d5be5dcb8b.yml
3+
openapi_spec_hash: b4339d93d43fb725be0e98bd3bbf4f0b
44
config_hash: 9d144cc6c49d3fd53e5b4472c1e22165

‎README.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ client = ModerationAPI(
3434

3535
response = client.content.submit(
3636
content={
37-
"text": "x",
37+
"text": "text",
3838
"type": "text",
3939
},
4040
)
@@ -63,7 +63,7 @@ client = AsyncModerationAPI(
6363
async def main() -> None:
6464
response = await client.content.submit(
6565
content={
66-
"text": "x",
66+
"text": "text",
6767
"type": "text",
6868
},
6969
)
@@ -102,7 +102,7 @@ async def main() -> None:
102102
) as client:
103103
response = await client.content.submit(
104104
content={
105-
"text": "x",
105+
"text": "text",
106106
"type": "text",
107107
},
108108
)
@@ -155,7 +155,7 @@ client = ModerationAPI()
155155
try:
156156
client.content.submit(
157157
content={
158-
"text": "x",
158+
"text": "text",
159159
"type": "text",
160160
},
161161
)
@@ -203,7 +203,7 @@ client = ModerationAPI(
203203
# Or, configure per-request:
204204
client.with_options(max_retries=5).content.submit(
205205
content={
206-
"text": "x",
206+
"text": "text",
207207
"type": "text",
208208
},
209209
)
@@ -231,7 +231,7 @@ client = ModerationAPI(
231231
# Override per-request:
232232
client.with_options(timeout=5.0).content.submit(
233233
content={
234-
"text": "x",
234+
"text": "text",
235235
"type": "text",
236236
},
237237
)
@@ -277,7 +277,7 @@ from moderation_api import ModerationAPI
277277
client = ModerationAPI()
278278
response = client.content.with_raw_response.submit(
279279
content={
280-
"text": "x",
280+
"text": "text",
281281
"type": "text",
282282
},
283283
)
@@ -300,7 +300,7 @@ To stream the response body, use `.with_streaming_response` instead, which requi
300300
```python
301301
with client.content.with_streaming_response.submit(
302302
content={
303-
"text": "x",
303+
"text": "text",
304304
"type": "text",
305305
},
306306
) as response:

‎tests/api_resources/test_content.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TestContent:
2222
def test_method_submit(self, client: ModerationAPI) -> None:
2323
content = client.content.submit(
2424
content={
25-
"text": "x",
25+
"text": "text",
2626
"type": "text",
2727
},
2828
)
@@ -33,7 +33,7 @@ def test_method_submit(self, client: ModerationAPI) -> None:
3333
def test_method_submit_with_all_params(self, client: ModerationAPI) -> None:
3434
content = client.content.submit(
3535
content={
36-
"text": "x",
36+
"text": "text",
3737
"type": "text",
3838
},
3939
author_id="authorId",
@@ -59,7 +59,7 @@ def test_method_submit_with_all_params(self, client: ModerationAPI) -> None:
5959
def test_raw_response_submit(self, client: ModerationAPI) -> None:
6060
response = client.content.with_raw_response.submit(
6161
content={
62-
"text": "x",
62+
"text": "text",
6363
"type": "text",
6464
},
6565
)
@@ -74,7 +74,7 @@ def test_raw_response_submit(self, client: ModerationAPI) -> None:
7474
def test_streaming_response_submit(self, client: ModerationAPI) -> None:
7575
with client.content.with_streaming_response.submit(
7676
content={
77-
"text": "x",
77+
"text": "text",
7878
"type": "text",
7979
},
8080
) as response:
@@ -97,7 +97,7 @@ class TestAsyncContent:
9797
async def test_method_submit(self, async_client: AsyncModerationAPI) -> None:
9898
content = await async_client.content.submit(
9999
content={
100-
"text": "x",
100+
"text": "text",
101101
"type": "text",
102102
},
103103
)
@@ -108,7 +108,7 @@ async def test_method_submit(self, async_client: AsyncModerationAPI) -> None:
108108
async def test_method_submit_with_all_params(self, async_client: AsyncModerationAPI) -> None:
109109
content = await async_client.content.submit(
110110
content={
111-
"text": "x",
111+
"text": "text",
112112
"type": "text",
113113
},
114114
author_id="authorId",
@@ -134,7 +134,7 @@ async def test_method_submit_with_all_params(self, async_client: AsyncModeration
134134
async def test_raw_response_submit(self, async_client: AsyncModerationAPI) -> None:
135135
response = await async_client.content.with_raw_response.submit(
136136
content={
137-
"text": "x",
137+
"text": "text",
138138
"type": "text",
139139
},
140140
)
@@ -149,7 +149,7 @@ async def test_raw_response_submit(self, async_client: AsyncModerationAPI) -> No
149149
async def test_streaming_response_submit(self, async_client: AsyncModerationAPI) -> None:
150150
async with async_client.content.with_streaming_response.submit(
151151
content={
152-
"text": "x",
152+
"text": "text",
153153
"type": "text",
154154
},
155155
) as response:

‎tests/test_client.py‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, clien
895895
with pytest.raises(APITimeoutError):
896896
client.content.with_streaming_response.submit(
897897
content={
898-
"text": "x",
898+
"text": "text",
899899
"type": "text",
900900
}
901901
).__enter__()
@@ -910,7 +910,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client
910910
with pytest.raises(APIStatusError):
911911
client.content.with_streaming_response.submit(
912912
content={
913-
"text": "x",
913+
"text": "text",
914914
"type": "text",
915915
}
916916
).__enter__()
@@ -944,7 +944,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
944944

945945
response = client.content.with_raw_response.submit(
946946
content={
947-
"text": "x",
947+
"text": "text",
948948
"type": "text",
949949
}
950950
)
@@ -973,7 +973,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
973973

974974
response = client.content.with_raw_response.submit(
975975
content={
976-
"text": "x",
976+
"text": "text",
977977
"type": "text",
978978
},
979979
extra_headers={"x-stainless-retry-count": Omit()},
@@ -1002,7 +1002,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
10021002

10031003
response = client.content.with_raw_response.submit(
10041004
content={
1005-
"text": "x",
1005+
"text": "text",
10061006
"type": "text",
10071007
},
10081008
extra_headers={"x-stainless-retry-count": "42"},
@@ -1863,7 +1863,7 @@ async def test_retrying_timeout_errors_doesnt_leak(
18631863
with pytest.raises(APITimeoutError):
18641864
await async_client.content.with_streaming_response.submit(
18651865
content={
1866-
"text": "x",
1866+
"text": "text",
18671867
"type": "text",
18681868
}
18691869
).__aenter__()
@@ -1880,7 +1880,7 @@ async def test_retrying_status_errors_doesnt_leak(
18801880
with pytest.raises(APIStatusError):
18811881
await async_client.content.with_streaming_response.submit(
18821882
content={
1883-
"text": "x",
1883+
"text": "text",
18841884
"type": "text",
18851885
}
18861886
).__aenter__()
@@ -1914,7 +1914,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
19141914

19151915
response = await client.content.with_raw_response.submit(
19161916
content={
1917-
"text": "x",
1917+
"text": "text",
19181918
"type": "text",
19191919
}
19201920
)
@@ -1943,7 +1943,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
19431943

19441944
response = await client.content.with_raw_response.submit(
19451945
content={
1946-
"text": "x",
1946+
"text": "text",
19471947
"type": "text",
19481948
},
19491949
extra_headers={"x-stainless-retry-count": Omit()},
@@ -1972,7 +1972,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
19721972

19731973
response = await client.content.with_raw_response.submit(
19741974
content={
1975-
"text": "x",
1975+
"text": "text",
19761976
"type": "text",
19771977
},
19781978
extra_headers={"x-stainless-retry-count": "42"},

0 commit comments

Comments
 (0)