-
Notifications
You must be signed in to change notification settings - Fork 12
/
Keyword.php
42 lines (34 loc) · 1 KB
/
Keyword.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
namespace Example;
use Domainrobot\Domainrobot;
use Domainrobot\Lib\DomainrobotAuth;
use Domainrobot\Lib\DomainrobotException;
use Domainrobot\Model\Keywords;
class SDKController
{
/**
* Sends an Keyword Request
* Get Google Ad Words Data
*
* @return ApiKeywordResponse
*/
public function keyword()
{
$domainrobot = new Domainrobot([
"url" => "https://api.autodns.com/v1/service/pricer",
"auth" => new DomainrobotAuth([
"user" => "username",
"password" => "password",
"context" => 4
])
]);
try {
$keywords = new Keywords();
$keywords->setKeywords(["programming", "development"]);
$apiKeywordResponse = $domainrobot->pcDomains->keyword($keywords);
} catch (DomainrobotException $exception) {
return $exception;
}
return $apiKeywordResponse;
}
}