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 Jul 23, 2024
1 parent ee56773 commit efb8aef
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 @@ -22,7 +22,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 @@ -50,7 +50,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 @@ -117,7 +117,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 @@ -134,7 +134,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 @@ -158,7 +158,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 @@ -269,7 +269,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 efb8aef

Please sign in to comment.