From efb8aef105adeaf98306eeb80129c9219ab84dad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:26:09 +0000 Subject: [PATCH] chore(docs): use client instead of package name in Node examples (#37) --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index adb5d70..ac25c0f 100644 --- a/README.md +++ b/README.md @@ -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 }); @@ -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 }); @@ -117,7 +117,7 @@ You can use the `maxRetries` option to configure or disable this: ```js // Configure the default for all requests: -const metronome = new Metronome({ +const client = new Metronome({ maxRetries: 0, // default is 2 }); @@ -134,7 +134,7 @@ Requests time out after 1 minute by default. You can configure this with a `time ```ts // Configure the default for all requests: -const metronome = new Metronome({ +const client = new Metronome({ timeout: 20 * 1000, // 20 seconds (default is 1 minute) }); @@ -158,7 +158,7 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi ```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 }) @@ -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), });