From 8f58216c56f67158e8bb41104f2731e54e6cc41c Mon Sep 17 00:00:00 2001 From: Farmer Date: Tue, 6 Feb 2024 13:27:40 -0600 Subject: [PATCH] Update user agent to use package Version Update user agent to use package Version --- CHANGELOG.md | 9 +++++++++ example/package.json | 2 +- package-lock.json | 12 ++++++++++-- package.json | 10 +++++++++- src/constants.js | 4 +++- 5 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4fad1f5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# wyze-api + +## Releases + +### v1.1.2 +- Change user aganet based on package version + +### v1.1.1 +- Chnage user agent to unofficial-wyze-api/1.0 \ No newline at end of file diff --git a/example/package.json b/example/package.json index a69f5cd..805e52a 100644 --- a/example/package.json +++ b/example/package.json @@ -22,6 +22,6 @@ "dependencies": { "axios": "^0.27.2", "@ptkdev/logger": "1.8.0", - "wyze-api": "1.1.0" + "wyze-api": "^1.1.1" } } diff --git a/package-lock.json b/package-lock.json index 56e4e2a..b8a46f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,24 @@ { "name": "wyze-api", - "version": "1.1.0", + "version": "1.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "wyze-api", - "version": "1.1.0", + "version": "1.1.2", "funding": [ { "type": "paypal", "url": "https://paypal.me/AllenFarmer" + }, + { + "type": "venmo", + "url": "https://venmo.com/u/Allen-Farmer" + }, + { + "type": "cashApp", + "url": "https://cash.app/$Jfamer08" } ], "license": "MIT", diff --git a/package.json b/package.json index 0e22194..5dc493b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wyze-api", - "version": "1.1.1", + "version": "1.1.2", "description": "An unoficial API wrapper for Wyze products.", "homepage": "https://github.com/jfarmer08/wyze-api", "main": "./src/index.js", @@ -36,6 +36,14 @@ { "type": "paypal", "url": "https://paypal.me/AllenFarmer" + }, + { + "type": "venmo", + "url": "https://venmo.com/u/Allen-Farmer" + }, + { + "type": "cashApp", + "url": "https://cash.app/$Jfamer08" } ], "directories": { diff --git a/src/constants.js b/src/constants.js index 6ed7133..81a269c 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,3 +1,5 @@ +const packageVersion = require('../package.json').version + module.exports = Object.freeze({ // Crypto Secrets fordAppKey: "275965684684dbdaf29a0ed9", // Required for Locks @@ -14,7 +16,7 @@ module.exports = Object.freeze({ sc: "wyze_developer_api", sv: "wyze_developer_api", authApiKey: "WMXHYf79Nr5gIlt3r0r7p9Tcw5bvs6BB4U8O8nGJ", - userAgent: "unofficial-wyze-api/1.0", + userAgent: "unofficial-wyze-api/" + packageVersion, //URLs authBaseUrl: "https://auth-prod.api.wyze.com",