screenshotone-api-sdk 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -15,6 +15,9 @@ const API_ANIMATE_PATH = "/animate";
15
15
  */
16
16
  class Client {
17
17
  constructor(accessKey, secretKey) {
18
+ if (!accessKey || !secretKey) {
19
+ throw new Error("Both non-empty access and secret keys are required");
20
+ }
18
21
  this.accessKey = accessKey;
19
22
  this.secretKey = secretKey;
20
23
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "screenshotone-api-sdk",
3
3
  "homepage": "https://screenshotone.com",
4
- "version": "1.1.1",
4
+ "version": "1.1.2",
5
5
  "description": "Use ScreenshotOne.com API to generate screenshots of any website.",
6
6
  "repository": {
7
7
  "type": "git",
package/src/main.ts CHANGED
@@ -14,6 +14,12 @@ export class Client {
14
14
  private readonly secretKey: string;
15
15
 
16
16
  constructor(accessKey: string, secretKey: string) {
17
+ if (!accessKey || !secretKey) {
18
+ throw new Error(
19
+ "Both non-empty access and secret keys are required"
20
+ );
21
+ }
22
+
17
23
  this.accessKey = accessKey;
18
24
  this.secretKey = secretKey;
19
25
  }