File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11configured_endpoints : 5
22openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/grid%2Fspreadsheet-api-f9fd5fb43d56001ea7d7f49e92bd55134347b198b2664fd76321cc02a75817c9.yml
33openapi_spec_hash : 5130b5ebb7cbfe7a906716c5cf21764b
4- config_hash : f5d6b47b28c650e373afc0eb0396899e
4+ config_hash : 3e61a9566953ce5dbd4bcea7ceb568a3
Original file line number Diff line number Diff line change @@ -138,7 +138,6 @@ You can use the `maxRetries` option to configure or disable this:
138138// Configure the default for all requests:
139139const client = new Grid ({
140140 maxRetries: 0 , // default is 2
141- apiKey: ' My API Key' ,
142141});
143142
144143// Or, configure per-request:
@@ -156,7 +155,6 @@ Requests time out after one minute by default. You can configure this with a `ti
156155// Configure the default for all requests:
157156const client = new Grid ({
158157 timeout: 20 * 1000 , // 20 seconds (default is 1 minute)
159- apiKey: ' My API Key' ,
160158});
161159
162160// Override per-request:
Original file line number Diff line number Diff line change @@ -186,6 +186,10 @@ export class Grid {
186186 return ;
187187 }
188188
189+ protected authHeaders ( opts : FinalRequestOptions ) : Headers | undefined {
190+ return new Headers ( { Authorization : `Bearer ${ this . apiKey } ` } ) ;
191+ }
192+
189193 /**
190194 * Basic re-implementation of `qs.stringify` for primitive types.
191195 */
@@ -636,6 +640,7 @@ export class Grid {
636640 ...getPlatformHeaders ( ) ,
637641 'X-Client-Name' : 'api-sdk' ,
638642 } ,
643+ this . authHeaders ( options ) ,
639644 this . _options . defaultHeaders ,
640645 bodyHeaders ,
641646 options . headers ,
You can’t perform that action at this time.
0 commit comments