Skip to content

Commit 187bf11

Browse files
committed
Add SDK telemetry headers (v0.5.1)
- Add X-Api-Client header: 'oilpriceapi-node' - Add X-Client-Version header: '0.5.1' - Update User-Agent to include Node.js version - Remove deprecated X-SDK-Language, X-SDK-Version, X-Client-Type headers Resolves: #12 Documentation: /home/kwaldman/code/sdks/EISENHOWER_MATRIX_PLAN.md
1 parent 36734a9 commit 187bf11

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oilpriceapi",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Official Node.js SDK for Oil Price API - Real-time and historical oil & commodity prices",
55
"type": "module",
66
"main": "./dist/index.js",

src/client.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,9 @@ export class OilPriceAPI {
181181
headers: {
182182
'Authorization': `Bearer ${this.apiKey}`,
183183
'Content-Type': 'application/json',
184-
'User-Agent': 'oilpriceapi-node/0.5.0',
185-
'X-SDK-Language': 'javascript',
186-
'X-SDK-Version': '0.5.0',
187-
'X-Client-Type': 'sdk',
184+
'User-Agent': 'oilpriceapi-node/0.5.1 node/' + process.version,
185+
'X-Api-Client': 'oilpriceapi-node',
186+
'X-Client-Version': '0.5.1',
188187
},
189188
signal: controller.signal,
190189
});

0 commit comments

Comments
 (0)