Skip to content

Commit

Permalink
Add new methods to the SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
krasun committed Aug 23, 2024
1 parent 08002fd commit 4b183ba
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "screenshotone-api-sdk",
"homepage": "https://screenshotone.com",
"version": "1.1.11",
"version": "1.1.12",
"description": "Use ScreenshotOne.com API to generate screenshots of any website.",
"repository": {
"type": "git",
Expand Down
26 changes: 25 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,6 @@ export class AnimateOptions {

return this;
}

scrollStartImmediately(startImmediately: boolean): AnimateOptions {
this.put(
"scroll_start_immediately",
Expand All @@ -1388,6 +1387,31 @@ export class AnimateOptions {

scrollBack(scrollBack: boolean): AnimateOptions {
this.put("scroll_back", scrollBack ? "true" : "false");

return this;
}

scrollBackAfterDuration(duration: number): AnimateOptions {
this.put("scroll_back_after_duration", duration.toString());

return this;
}

scrollStartDelay(delay: number): AnimateOptions {
this.put("scroll_start_delay", delay.toString());

return this;
}

scrollComplete(complete: boolean): AnimateOptions {
this.put("scroll_complete", complete ? "true" : "false");

return this;
}

scrollBy(pixels: number): AnimateOptions {
this.put("scroll_by", pixels.toString());

return this;
}

Expand Down

0 comments on commit 4b183ba

Please sign in to comment.