Skip to content

Commit

Permalink
chore(docs): use client instead of package name in Node examples (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jul 23, 2024
1 parent be42b42 commit f50e036
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The full API of this library can be found in [api.md](api.md).
```js
import Metronome from '@metronome/sdk';

const metronome = new Metronome({
const client = new Metronome({
bearerToken: process.env['METRONOME_BEARER_TOKEN'], // This is the default and can be omitted
});

Expand Down Expand Up @@ -52,7 +52,7 @@ This library includes TypeScript definitions for all request params and response
```ts
import Metronome from '@metronome/sdk';

const metronome = new Metronome({
const client = new Metronome({
bearerToken: process.env['METRONOME_BEARER_TOKEN'], // This is the default and can be omitted
});

Expand Down Expand Up @@ -119,7 +119,7 @@ You can use the `maxRetries` option to configure or disable this:
<!-- prettier-ignore -->
```js
// Configure the default for all requests:
const metronome = new Metronome({
const client = new Metronome({
maxRetries: 0, // default is 2
});

Expand All @@ -136,7 +136,7 @@ Requests time out after 1 minute by default. You can configure this with a `time
<!-- prettier-ignore -->
```ts
// Configure the default for all requests:
const metronome = new Metronome({
const client = new Metronome({
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
});

Expand All @@ -160,7 +160,7 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi

<!-- prettier-ignore -->
```ts
const metronome = new Metronome();
const client = new Metronome();

const response = await metronome.alerts
.create({ alert_type: 'spend_threshold_reached', name: '$100 spend threshold reached', threshold: 10000 })
Expand Down Expand Up @@ -271,7 +271,7 @@ import http from 'http';
import { HttpsProxyAgent } from 'https-proxy-agent';

// Configure the default for all requests:
const metronome = new Metronome({
const client = new Metronome({
httpAgent: new HttpsProxyAgent(process.env.PROXY_URL),
});

Expand Down

0 comments on commit f50e036

Please sign in to comment.