screenshotone-api-sdk 1.0.23 → 1.0.25
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/@types/main.d.ts +13 -2
- package/dist/main.js +19 -2
- package/package.json +1 -1
- package/src/main.ts +23 -2
package/dist/@types/main.d.ts
CHANGED
|
@@ -28,13 +28,24 @@ export declare class TakeOptions {
|
|
|
28
28
|
static markdown(markdown: string): TakeOptions;
|
|
29
29
|
private put;
|
|
30
30
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
* Selector is a CSS-like selector of the element to take a screenshot of.
|
|
32
|
+
*/
|
|
33
33
|
selector(selector: string): this;
|
|
34
|
+
/**
|
|
35
|
+
* Available response types:
|
|
36
|
+
* by_format — return exactly the response defined in the format option. If format=png, the response will be the binary representation of the png with the content type header image/png;
|
|
37
|
+
* empty — return only status or error. It is suitable when you want to upload the screenshot to storage and don’t care about the results. It also speeds up the response since there are no networking costs involved.
|
|
38
|
+
* The default value is by_format.
|
|
39
|
+
*/
|
|
40
|
+
responseType(responseType: string): this;
|
|
34
41
|
/**
|
|
35
42
|
* It determines the behavior of what to do when selector is not found.
|
|
36
43
|
*/
|
|
37
44
|
errorOnSelectorNotFound(errorOn: boolean): this;
|
|
45
|
+
/**
|
|
46
|
+
* Capture beyond the viewport.
|
|
47
|
+
*/
|
|
48
|
+
captureBeyondViewport(beyond: boolean): this;
|
|
38
49
|
/**
|
|
39
50
|
* When reduced_motion set to `true`,
|
|
40
51
|
* the API will request the site to minimize the amount of non-essential motion it uses.
|
package/dist/main.js
CHANGED
|
@@ -100,12 +100,22 @@ class TakeOptions {
|
|
|
100
100
|
}
|
|
101
101
|
;
|
|
102
102
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
* Selector is a CSS-like selector of the element to take a screenshot of.
|
|
104
|
+
*/
|
|
105
105
|
selector(selector) {
|
|
106
106
|
this.put("selector", selector);
|
|
107
107
|
return this;
|
|
108
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Available response types:
|
|
111
|
+
* by_format — return exactly the response defined in the format option. If format=png, the response will be the binary representation of the png with the content type header image/png;
|
|
112
|
+
* empty — return only status or error. It is suitable when you want to upload the screenshot to storage and don’t care about the results. It also speeds up the response since there are no networking costs involved.
|
|
113
|
+
* The default value is by_format.
|
|
114
|
+
*/
|
|
115
|
+
responseType(responseType) {
|
|
116
|
+
this.put("response_type", responseType);
|
|
117
|
+
return this;
|
|
118
|
+
}
|
|
109
119
|
/**
|
|
110
120
|
* It determines the behavior of what to do when selector is not found.
|
|
111
121
|
*/
|
|
@@ -113,6 +123,13 @@ class TakeOptions {
|
|
|
113
123
|
this.put("error_on_selector_not_found", errorOn ? "true" : "false");
|
|
114
124
|
return this;
|
|
115
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Capture beyond the viewport.
|
|
128
|
+
*/
|
|
129
|
+
captureBeyondViewport(beyond) {
|
|
130
|
+
this.put("capture_beyond_viewport", beyond ? "true" : "false");
|
|
131
|
+
return this;
|
|
132
|
+
}
|
|
116
133
|
/**
|
|
117
134
|
* When reduced_motion set to `true`,
|
|
118
135
|
* the API will request the site to minimize the amount of non-essential motion it uses.
|
package/package.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -92,14 +92,26 @@ export class TakeOptions {
|
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
* Selector is a CSS-like selector of the element to take a screenshot of.
|
|
96
|
+
*/
|
|
97
97
|
selector(selector: string) {
|
|
98
98
|
this.put("selector", selector);
|
|
99
99
|
|
|
100
100
|
return this;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Available response types:
|
|
105
|
+
* by_format — return exactly the response defined in the format option. If format=png, the response will be the binary representation of the png with the content type header image/png;
|
|
106
|
+
* empty — return only status or error. It is suitable when you want to upload the screenshot to storage and don’t care about the results. It also speeds up the response since there are no networking costs involved.
|
|
107
|
+
* The default value is by_format.
|
|
108
|
+
*/
|
|
109
|
+
responseType(responseType: string) {
|
|
110
|
+
this.put("response_type", responseType);
|
|
111
|
+
|
|
112
|
+
return this;
|
|
113
|
+
}
|
|
114
|
+
|
|
103
115
|
/**
|
|
104
116
|
* It determines the behavior of what to do when selector is not found.
|
|
105
117
|
*/
|
|
@@ -109,6 +121,15 @@ export class TakeOptions {
|
|
|
109
121
|
return this;
|
|
110
122
|
}
|
|
111
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Capture beyond the viewport.
|
|
126
|
+
*/
|
|
127
|
+
captureBeyondViewport(beyond: boolean) {
|
|
128
|
+
this.put("capture_beyond_viewport", beyond ? "true" : "false");
|
|
129
|
+
|
|
130
|
+
return this;
|
|
131
|
+
}
|
|
132
|
+
|
|
112
133
|
/**
|
|
113
134
|
* When reduced_motion set to `true`,
|
|
114
135
|
* the API will request the site to minimize the amount of non-essential motion it uses.
|