Skip to content

Commit c90715f

Browse files
feat(api): Fix readme title, fix inverted example params
1 parent 379cf45 commit c90715f

2 files changed

Lines changed: 18 additions & 24 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 50
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cryptech%2Fneptune-api-v2-cd88dd75403e620991c3659cd7e9278f9c8c439f3857c25db8634dfc7e77a9b9.yml
33
openapi_spec_hash: 35a0cbd0262458d633e38fc5ba442118
4-
config_hash: 44386e9d4a51b58f5f2834717af79934
4+
config_hash: dc344034a910e99efa08ab68979a541e

README.md

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ from neptune_api_v2 import NeptuneAPIV2
3232

3333
client = NeptuneAPIV2()
3434

35-
response = client.markets.get_overview()
35+
response = client.markets.get_overview(
36+
with_text=True,
37+
with_value=True,
38+
)
3639
print(response.data)
3740
```
3841

@@ -48,7 +51,10 @@ client = AsyncNeptuneAPIV2()
4851

4952

5053
async def main() -> None:
51-
response = await client.markets.get_overview()
54+
response = await client.markets.get_overview(
55+
with_text=True,
56+
with_value=True,
57+
)
5258
print(response.data)
5359

5460

@@ -80,7 +86,10 @@ async def main() -> None:
8086
async with AsyncNeptuneAPIV2(
8187
http_client=DefaultAioHttpClient(),
8288
) as client:
83-
response = await client.markets.get_overview()
89+
response = await client.markets.get_overview(
90+
with_text=True,
91+
with_value=True,
92+
)
8493
print(response.data)
8594

8695

@@ -183,10 +192,7 @@ from neptune_api_v2 import NeptuneAPIV2
183192
client = NeptuneAPIV2()
184193

185194
try:
186-
client.markets.get_overview(
187-
with_text=True,
188-
with_value=True,
189-
)
195+
client.markets.get_overview()
190196
except neptune_api_v2.APIConnectionError as e:
191197
print("The server could not be reached")
192198
print(e.__cause__) # an underlying Exception, likely raised within httpx.
@@ -229,10 +235,7 @@ client = NeptuneAPIV2(
229235
)
230236

231237
# Or, configure per-request:
232-
client.with_options(max_retries=5).markets.get_overview(
233-
with_text=True,
234-
with_value=True,
235-
)
238+
client.with_options(max_retries=5).markets.get_overview()
236239
```
237240

238241
### Timeouts
@@ -255,10 +258,7 @@ client = NeptuneAPIV2(
255258
)
256259

257260
# Override per-request:
258-
client.with_options(timeout=5.0).markets.get_overview(
259-
with_text=True,
260-
with_value=True,
261-
)
261+
client.with_options(timeout=5.0).markets.get_overview()
262262
```
263263

264264
On timeout, an `APITimeoutError` is thrown.
@@ -299,10 +299,7 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
299299
from neptune_api_v2 import NeptuneAPIV2
300300

301301
client = NeptuneAPIV2()
302-
response = client.markets.with_raw_response.get_overview(
303-
with_text=True,
304-
with_value=True,
305-
)
302+
response = client.markets.with_raw_response.get_overview()
306303
print(response.headers.get('X-My-Header'))
307304

308305
market = response.parse() # get the object that `markets.get_overview()` would have returned
@@ -320,10 +317,7 @@ The above interface eagerly reads the full response body when you make the reque
320317
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
321318

322319
```python
323-
with client.markets.with_streaming_response.get_overview(
324-
with_text=True,
325-
with_value=True,
326-
) as response:
320+
with client.markets.with_streaming_response.get_overview() as response:
327321
print(response.headers.get("X-My-Header"))
328322

329323
for line in response.iter_lines():

0 commit comments

Comments
 (0)