Skip to content

Commit

Permalink
Added support for HD images to the PHP API.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrabzIt committed Jun 20, 2019
1 parent 9b703ec commit dc13d29
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "https://grabz.it/",
"description": "Use our API to allow your app to create images, DOCX documents and PDF's from URL's or raw HTML. Additionally GrabzIt allows you to convert online videos into animated GIF's or HTML tables into CSV's.",
"license": "MIT",
"version":"3.3.0.2",
"version":"3.3.4",
"autoload": {
"psr-4": {
"GrabzIt\\": "lib/"
Expand Down
20 changes: 19 additions & 1 deletion lib/GrabzItImageOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class GrabzItImageOptions extends GrabzItBaseOptions
private $noAds = false;
private $noCookieNotifications = false;
private $address = null;
private $hd = false;

/*
Set the width of the browser in pixels.
Expand Down Expand Up @@ -225,6 +226,22 @@ public function setTransparent($value)
public function getTransparent()
{
return $this->transparent;
}

/*
Set to true if the image capture should be in high definition.
*/
public function setHD($value)
{
$this->hd = $value;
}

/*
Get if the if the image capture should be in high definition.
*/
public function getHD()
{
return $this->hd;
}

/*
Expand Down Expand Up @@ -306,7 +323,7 @@ public function _getSignatureString($applicationSecret, $callBackURL, $url = nul
."|".$this->nullToEmpty($this->browserWidth)."|".$this->nullToEmpty($this->getCustomId())."|".$this->nullToEmpty($this->delay)."|".$this->nullToEmpty($this->targetElement)
."|".$this->nullToEmpty($this->customWaterMarkId)."|".$this->nullToEmpty(intval($this->requestAs))."|".$this->nullToEmpty($this->getCountry())."|".
$this->nullToEmpty($this->quality)."|".$this->nullToEmpty($this->hideElement)."|".$this->nullToEmpty($this->getExportURL())."|".
$this->nullToEmpty($this->waitForElement)."|".$this->nullToEmpty(intval($this->transparent))."|".$this->nullToEmpty($this->getEncryptionKey())."|".$this->nullToEmpty(intval($this->noAds))."|".$this->nullToEmpty($this->post)."|".$this->nullToEmpty($this->getProxy())."|".$this->nullToEmpty($this->address)."|".$this->nullToEmpty(intval($this->noCookieNotifications));
$this->nullToEmpty($this->waitForElement)."|".$this->nullToEmpty(intval($this->transparent))."|".$this->nullToEmpty($this->getEncryptionKey())."|".$this->nullToEmpty(intval($this->noAds))."|".$this->nullToEmpty($this->post)."|".$this->nullToEmpty($this->getProxy())."|".$this->nullToEmpty($this->address)."|".$this->nullToEmpty(intval($this->noCookieNotifications))."|".$this->nullToEmpty(intval($this->hd));
}

public function _getParameters($applicationKey, $sig, $callBackURL, $dataName, $dataValue)
Expand All @@ -329,6 +346,7 @@ public function _getParameters($applicationKey, $sig, $callBackURL, $dataName, $
$params['post'] = $this->nullToEmpty($this->post);
$params['address'] = $this->nullToEmpty($this->address);
$params['nonotify'] = $this->nullToEmpty(intval($this->noCookieNotifications));
$params['hd'] = $this->nullToEmpty(intval($this->hd));

return $params;
}
Expand Down

0 comments on commit dc13d29

Please sign in to comment.