Skip to content

Commit

Permalink
Fix for web service path
Browse files Browse the repository at this point in the history
  • Loading branch information
GrabzIt committed Oct 14, 2021
1 parent e959d2a commit f7535ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 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, rendered HTML 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.5.0",
"version":"3.5.2",
"autoload": {
"psr-4": {
"GrabzIt\\": "lib/"
Expand Down
28 changes: 14 additions & 14 deletions lib/GrabzItClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
class GrabzItClient
{
const WebServicesBaseURL = "://api.grabz.it/services/";
const TakePicture = "takepicture.ashx";
const TakeTable = "taketable.ashx";
const TakePDF = "takepdf.ashx";
const TakeDOCX = "takedocx.ashx";
const TakeHTML = "takehtml.ashx";
const TakePicture = "takepicture";
const TakeTable = "taketable";
const TakePDF = "takepdf";
const TakeDOCX = "takedocx";
const TakeHTML = "takehtml";
const TrueString = "True";

private $applicationKey;
Expand Down Expand Up @@ -166,7 +166,7 @@ public function URLToAnimation($url, GrabzItAnimationOptions $options = null)
$options = new GrabzItAnimationOptions();
}

$this->request = new GrabzItRequest($this->getRootUrl() . "takeanimation.ashx", false, $options, $url);
$this->request = new GrabzItRequest($this->getRootUrl() . "takeanimation", false, $options, $url);
}

/*
Expand Down Expand Up @@ -521,7 +521,7 @@ public function GetStatus($id)
return null;
}

$result = $this->Get($this->getRootUrl() . "getstatus.ashx?id=" . $id);
$result = $this->Get($this->getRootUrl() . "getstatus?id=" . $id);

$obj = simplexml_load_string($result);

Expand All @@ -548,7 +548,7 @@ public function GetResult($id)
return null;
}

$result = $this->Get($this->getRootUrl() . "getfile.ashx?id=" . $id);
$result = $this->Get($this->getRootUrl() . "getfile?id=" . $id);

if (empty($result))
{
Expand All @@ -571,7 +571,7 @@ public function GetCookies($domain)

$qs = "key=" .urlencode($this->applicationKey)."&domain=".urlencode($domain)."&sig=".$sig;

$obj = $this->getResultObject($this->Get($this->getRootUrl() . "getcookies.ashx?" . $qs));
$obj = $this->getResultObject($this->Get($this->getRootUrl() . "getcookies?" . $qs));

$result = array();

Expand Down Expand Up @@ -613,7 +613,7 @@ public function SetCookie($name, $domain, $value = "", $path = "/", $httponly =

$qs = "key=" .urlencode($this->applicationKey)."&domain=".urlencode($domain)."&name=".urlencode($name)."&value=".urlencode($value)."&path=".urlencode($path)."&httponly=".intval($httponly)."&expires=".urlencode($expires)."&sig=".$sig;

return $this->isSuccessful($this->Get($this->getRootUrl() . "setcookie.ashx?" . $qs));
return $this->isSuccessful($this->Get($this->getRootUrl() . "setcookie?" . $qs));
}

/*
Expand All @@ -630,7 +630,7 @@ public function DeleteCookie($name, $domain)

$qs = "key=" .urlencode($this->applicationKey)."&domain=".urlencode($domain)."&name=".urlencode($name)."&delete=1&sig=".$sig;

return $this->isSuccessful($this->Get($this->getRootUrl() . "setcookie.ashx?" . $qs));
return $this->isSuccessful($this->Get($this->getRootUrl() . "setcookie?" . $qs));
}

/*
Expand Down Expand Up @@ -692,7 +692,7 @@ public function AddWaterMark($identifier, $path, $xpos, $ypos)

$context = stream_context_create($opts);

$response = @file_get_contents($this->getRootUrl() . 'addwatermark.ashx', false, $context);
$response = @file_get_contents($this->getRootUrl() . 'addwatermark', false, $context);

if (isset($http_response_header))
{
Expand Down Expand Up @@ -720,7 +720,7 @@ public function DeleteWaterMark($identifier)

$qs = "key=" .urlencode($this->applicationKey)."&identifier=".urlencode($identifier)."&sig=".$sig;

return $this->isSuccessful($this->Get($this->getRootUrl() . "deletewatermark.ashx?" . $qs));
return $this->isSuccessful($this->Get($this->getRootUrl() . "deletewatermark?" . $qs));
}

/*
Expand Down Expand Up @@ -758,7 +758,7 @@ private function _getWaterMarks($identifier = null)

$qs = "key=" .urlencode($this->applicationKey)."&identifier=".urlencode($identifier)."&sig=".$sig;

$obj = $this->getResultObject($this->Get($this->getRootUrl() . "getwatermarks.ashx?" . $qs));
$obj = $this->getResultObject($this->Get($this->getRootUrl() . "getwatermarks?" . $qs));

$result = array();

Expand Down

0 comments on commit f7535ec

Please sign in to comment.