mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-29 16:36:07 +03:00
Fixed an issue with HTTPBroker, Lists, Routes and Stats
This commit is contained in:
parent
f3c7fb51d9
commit
854711656c
@ -51,8 +51,8 @@ class HttpBroker{
|
|||||||
|
|
||||||
public function getRequest($endpointUrl, $queryString = array()){
|
public function getRequest($endpointUrl, $queryString = array()){
|
||||||
$request = $this->mgClient->get($endpointUrl);
|
$request = $this->mgClient->get($endpointUrl);
|
||||||
foreach($queryString as $queryKey=>$queryValue){
|
foreach($queryString as $key=>$value){
|
||||||
$request->getQuery()->set($queryKey, $queryValue);
|
$request->getQuery()->set($key, $value);
|
||||||
}
|
}
|
||||||
$response = $request->send();
|
$response = $request->send();
|
||||||
return $this->responseHandler($response);
|
return $this->responseHandler($response);
|
||||||
|
@ -14,7 +14,7 @@ class Lists{
|
|||||||
|
|
||||||
public function __construct($httpBroker){
|
public function __construct($httpBroker){
|
||||||
$this->httpBroker = $httpBroker;
|
$this->httpBroker = $httpBroker;
|
||||||
$this->endpointUrl = $this->httpBroker->returnWorkingDomain() . "/lists";
|
$this->endpointUrl = "lists";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ class Routes{
|
|||||||
|
|
||||||
public function __construct($httpBroker){
|
public function __construct($httpBroker){
|
||||||
$this->httpBroker = $httpBroker;
|
$this->httpBroker = $httpBroker;
|
||||||
$this->endpointUrl = $this->httpBroker->returnWorkingDomain() . "/routes";
|
$this->endpointUrl = "routes";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRoutes($limit, $skip){
|
public function getRoutes($limit, $skip){
|
||||||
|
@ -25,8 +25,8 @@ class Stats{
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getStats($limit, $skip){
|
public function getStats($filterParams = array()){
|
||||||
$response = $this->httpBroker->getRequest($this->statsEndpointUrl, array($limit, $skip, $event, $start-date));
|
$response = $this->httpBroker->getRequest($this->statsEndpointUrl, $filterParams);
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user