Skip to content

Commit 4230aaf

Browse files
Update README.md
1 parent 03b3b68 commit 4230aaf

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Developer-friendly & type-safe Typescript SDK specifically catered to leverage *
1313
<br /><br />
1414
> [!IMPORTANT]
1515
> This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/speakeasy-self/speakeasy-public). Delete this section before > publishing to a package manager.
16-
1716
<!-- Start Summary [summary] -->
1817
## Summary
1918

@@ -79,9 +78,7 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
7978
<!-- End Requirements [requirements] -->
8079

8180
## SDK Example Usage
82-
8381
### Example
84-
8582
```typescript
8683
import { SDK } from "@speakeasyapi/code-samples";
8784
import { promises as fs } from "fs"
@@ -92,9 +89,6 @@ const sdk = new SDK({
9289
},
9390
});
9491

95-
const fileBuffer = await fs.readFile("openapi.json");
96-
const fileContent = new Uint8Array(fileBuffer);
97-
9892
async function run() {
9993
const result = await sdk.codesamples.preview({
10094
languages: ["python", "typescript"],
@@ -110,7 +104,7 @@ async function run() {
110104
run();
111105

112106
```
113-
107+
<!-- No SDK Example Usage [usage] -->
114108
<!-- Start Available Resources and Operations [operations] -->
115109
## Available Resources and Operations
116110

@@ -161,7 +155,6 @@ Certain SDK methods accept files as part of a multi-part request. It is possible
161155
> - **Bun:** The native [`Bun.file`](https://bun.sh/docs/api/file-io#reading-files-bun-file) function produces a file handle that can be used for streaming file uploads.
162156
> - **Browsers:** All supported browsers return an instance to a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) when reading the value from an `<input type="file">` element.
163157
> - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob).
164-
165158
```typescript
166159
import { SDK } from "@speakeasyapi/code-samples";
167160
import { promises as fs } from "fs"
@@ -172,9 +165,6 @@ const sdk = new SDK({
172165
},
173166
});
174167

175-
const fileBuffer = await fs.readFile("openapi.json");
176-
const fileContent = new Uint8Array(fileBuffer);
177-
178168
async function run() {
179169
const result = await sdk.codesamples.preview({
180170
languages: ["python", "typescript"],
@@ -188,8 +178,10 @@ async function run() {
188178
}
189179

190180
run();
191-
192181
```
182+
<!-- No File uploads [file-upload] -->
183+
184+
<!-- No Retries [retries] -->
193185

194186
<!-- Start Error Handling [errors] -->
195187
## Error Handling
@@ -436,7 +428,6 @@ You can pass a logger that matches `console`'s interface as an SDK option.
436428

437429
> [!WARNING]
438430
> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
439-
440431
```typescript
441432
import { SDK } from "@speakeasyapi/code-samples";
442433

0 commit comments

Comments
 (0)