screenshotone-api-sdk 1.0.26 → 1.0.27

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.
@@ -232,6 +232,18 @@ export declare class TakeOptions {
232
232
  * Sets an authorization header for the request.
233
233
  */
234
234
  authorization(authorization: string): TakeOptions;
235
+ /**
236
+ * It scrolls the page if needed and ensures that the given
237
+ * selector is present in the view when taking a screenshot.
238
+ */
239
+ scrollIntoView(selector: string): TakeOptions;
240
+ /**
241
+ * You can use your custom proxy to take screenshots
242
+ * or render HTML with the proxy option.
243
+ *
244
+ * The https, http, socks4 and socks5 proxies are supported.
245
+ */
246
+ proxy(proxy: string): TakeOptions;
235
247
  /**
236
248
  * Set cookies for the request.
237
249
  */
@@ -343,6 +355,13 @@ export declare class AnimateOptions {
343
355
  * Styles specifies custom CSS styles for the page.
344
356
  */
345
357
  styles(styles: string): this;
358
+ /**
359
+ * You can use your custom proxy to take screenshots
360
+ * or render HTML with the proxy option.
361
+ *
362
+ * The https, http, socks4 and socks5 proxies are supported.
363
+ */
364
+ proxy(proxy: string): AnimateOptions;
346
365
  /**
347
366
  * Scripts specifies custom scripts for the page.
348
367
  */
package/dist/main.js CHANGED
@@ -439,6 +439,24 @@ class TakeOptions {
439
439
  this.put("authorization", authorization);
440
440
  return this;
441
441
  }
442
+ /**
443
+ * It scrolls the page if needed and ensures that the given
444
+ * selector is present in the view when taking a screenshot.
445
+ */
446
+ scrollIntoView(selector) {
447
+ this.put("scroll_into_view", selector);
448
+ return this;
449
+ }
450
+ /**
451
+ * You can use your custom proxy to take screenshots
452
+ * or render HTML with the proxy option.
453
+ *
454
+ * The https, http, socks4 and socks5 proxies are supported.
455
+ */
456
+ proxy(proxy) {
457
+ this.put("proxy", proxy);
458
+ return this;
459
+ }
442
460
  /**
443
461
  * Set cookies for the request.
444
462
  */
@@ -620,6 +638,16 @@ class AnimateOptions {
620
638
  this.put("styles", styles);
621
639
  return this;
622
640
  }
641
+ /**
642
+ * You can use your custom proxy to take screenshots
643
+ * or render HTML with the proxy option.
644
+ *
645
+ * The https, http, socks4 and socks5 proxies are supported.
646
+ */
647
+ proxy(proxy) {
648
+ this.put("proxy", proxy);
649
+ return this;
650
+ }
623
651
  /**
624
652
  * Scripts specifies custom scripts for the page.
625
653
  */
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.0.26",
4
+ "version": "1.0.27",
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
@@ -513,6 +513,28 @@ export class TakeOptions {
513
513
  return this;
514
514
  }
515
515
 
516
+ /**
517
+ * It scrolls the page if needed and ensures that the given
518
+ * selector is present in the view when taking a screenshot.
519
+ */
520
+ scrollIntoView(selector: string): TakeOptions {
521
+ this.put("scroll_into_view", selector);
522
+
523
+ return this;
524
+ }
525
+
526
+ /**
527
+ * You can use your custom proxy to take screenshots
528
+ * or render HTML with the proxy option.
529
+ *
530
+ * The https, http, socks4 and socks5 proxies are supported.
531
+ */
532
+ proxy(proxy: string): TakeOptions {
533
+ this.put("proxy", proxy);
534
+
535
+ return this;
536
+ }
537
+
516
538
  /**
517
539
  * Set cookies for the request.
518
540
  */
@@ -531,6 +553,7 @@ export class TakeOptions {
531
553
  return this;
532
554
  }
533
555
 
556
+
534
557
  /**
535
558
  * TimeZone sets time zone for the request.
536
559
  * Available time zones are: "America/Santiago", "Asia/Shanghai", "Europe/Berlin", "America/Guayaquil",
@@ -736,6 +759,18 @@ export class AnimateOptions {
736
759
  return this;
737
760
  }
738
761
 
762
+ /**
763
+ * You can use your custom proxy to take screenshots
764
+ * or render HTML with the proxy option.
765
+ *
766
+ * The https, http, socks4 and socks5 proxies are supported.
767
+ */
768
+ proxy(proxy: string): AnimateOptions {
769
+ this.put("proxy", proxy);
770
+
771
+ return this;
772
+ }
773
+
739
774
  /**
740
775
  * Scripts specifies custom scripts for the page.
741
776
  */