-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
MrFricker
committed
Feb 28, 2018
1 parent
4b73464
commit adc0e1e
Showing
8 changed files
with
141 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace WhoisAPI\Adapter\Browser; | ||
|
||
use WhoisAPI\Adapter\Base; | ||
|
||
class Screenshot extends Base { | ||
const END_POINT = '/screenshot'; | ||
|
||
/** | ||
* Set the payload for the request | ||
* | ||
* @param string $url the webaddress to capture | ||
* @param integer $width width of screenshot | ||
* @param integer $height height of screenshot | ||
* @param integer $maxTimeout max time for the server to wait for the page to load before taking a screenshot | ||
*/ | ||
public function setPayload($url, $width = 1200, $height = 800, $maxTimeout = 20) { | ||
$this->payload = [ | ||
'url' => $url, | ||
'width' => $width, | ||
'height' => $height, | ||
'maxTimeout' => $maxTimeout | ||
]; | ||
} | ||
|
||
/** | ||
* Build the base API request URL for this end-point | ||
* | ||
* @return String Complete API end-point URL | ||
*/ | ||
protected function getRequestBase() { | ||
return self::HOST . self::END_POINT; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace WhoisAPI\Adapter\Domain; | ||
|
||
use WhoisAPI\Adapter\Base; | ||
|
||
class Availability extends Base { | ||
const END_POINT = '/availability'; | ||
|
||
/** | ||
* Set the payload for the request | ||
* | ||
* @param string $domain domain name such as "google.com" to check for reg availability | ||
*/ | ||
public function setPayload($domain) { | ||
$this->payload = ['domain' => $domain]; | ||
} | ||
|
||
/** | ||
* Build the base API request URL for this end-point | ||
* | ||
* @return String Complete API end-point URL | ||
*/ | ||
protected function getRequestBase() { | ||
return self::HOST . self::END_POINT; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace WhoisAPI\Adapter\IP; | ||
|
||
use WhoisAPI\Adapter\Base; | ||
|
||
class Geo extends Base { | ||
const END_POINT = '/geo'; | ||
|
||
/** | ||
* Set the payload for the request | ||
* | ||
* @param string $ip IP address to lookup | ||
*/ | ||
public function setPayload($ip) { | ||
$this->payload = ['ip_address' => $ip]; | ||
} | ||
|
||
/** | ||
* Build the base API request URL for this end-point | ||
* | ||
* @return String Complete API end-point URL | ||
*/ | ||
protected function getRequestBase() { | ||
return self::HOST . self::END_POINT; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace WhoisAPI\Adapter\IP; | ||
|
||
use WhoisAPI\Adapter\Base; | ||
|
||
class Whois extends Base { | ||
const END_POINT = '/whois/ip'; | ||
|
||
/** | ||
* Set the payload for the request | ||
* | ||
* @param string $ip IP address to lookup | ||
*/ | ||
public function setPayload($ip) { | ||
$this->payload = ['ip_address' => $ip]; | ||
} | ||
|
||
/** | ||
* Build the base API request URL for this end-point | ||
* | ||
* @return String Complete API end-point URL | ||
*/ | ||
protected function getRequestBase() { | ||
return self::HOST . self::END_POINT; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters