(options: PipeOptions)
| 96 | private entityApiKey?: string; |
| 97 | |
| 98 | constructor(options: PipeOptions) { |
| 99 | this.prod = options.prod ?? isProd(); |
| 100 | this.baseUrl = getApiUrl(this.prod); |
| 101 | |
| 102 | this.request = new Request({ |
| 103 | apiKey: options.apiKey, |
| 104 | baseUrl: this.baseUrl, |
| 105 | }); |
| 106 | this.pipe = options; |
| 107 | this.entityApiKey = options.apiKey; |
| 108 | |
| 109 | delete this.pipe.prod; |
| 110 | delete this.pipe.apiKey; |
| 111 | |
| 112 | this.tools = this.getToolsFromPipe(this.pipe); |
| 113 | this.maxCalls = options.maxCalls || 100; // TODO: Find a sane default. |
| 114 | this.hasTools = Object.keys(this.tools).length > 0; |
| 115 | } |
| 116 | |
| 117 | private getToolsFromPipe( |
| 118 | pipe: Pipe, |
nothing calls this directly
no test coverage detected