@@ -28,49 +28,49 @@ |
||
| 28 | 28 | |
| 29 | 29 | class Custom { |
| 30 | 30 | |
| 31 | - private $url; |
|
| 32 | - private $api; |
|
| 31 | + private $url; |
|
| 32 | + private $api; |
|
| 33 | 33 | |
| 34 | - public function __construct (ApiInterface $api) |
|
| 35 | - { |
|
| 36 | - $this->api = $api; |
|
| 37 | - $this->url = 'https://api-ssl.bitly.com/v4/custom_bitlinks'; |
|
| 38 | - } |
|
| 34 | + public function __construct (ApiInterface $api) |
|
| 35 | + { |
|
| 36 | + $this->api = $api; |
|
| 37 | + $this->url = 'https://api-ssl.bitly.com/v4/custom_bitlinks'; |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - /* |
|
| 40 | + /* |
|
| 41 | 41 | Update Custom Bitlink |
| 42 | 42 | https://dev.bitly.com/v4/#operation/updateCustomBitlink |
| 43 | 43 | */ |
| 44 | - public function updateCustomBitlink(string $custom_bitlink, array $params) |
|
| 45 | - { |
|
| 46 | - return $this->api->patch($this->url . '/'.$custom_bitlink, $params); |
|
| 47 | - } |
|
| 44 | + public function updateCustomBitlink(string $custom_bitlink, array $params) |
|
| 45 | + { |
|
| 46 | + return $this->api->patch($this->url . '/'.$custom_bitlink, $params); |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | - /* |
|
| 49 | + /* |
|
| 50 | 50 | Retrieve Custom Bitlink |
| 51 | 51 | https://dev.bitly.com/v4/#operation/getCustomBitlink |
| 52 | 52 | */ |
| 53 | - public function getCustomBitlink(string $custom_bitlink) |
|
| 54 | - { |
|
| 55 | - return $this->api->get($this->url . '/'.$custom_bitlink); |
|
| 56 | - } |
|
| 53 | + public function getCustomBitlink(string $custom_bitlink) |
|
| 54 | + { |
|
| 55 | + return $this->api->get($this->url . '/'.$custom_bitlink); |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | - /* |
|
| 58 | + /* |
|
| 59 | 59 | Add Custom Bitlink |
| 60 | 60 | https://dev.bitly.com/v4/#operation/addCustomBitlink |
| 61 | 61 | */ |
| 62 | - public function addCustomBitlink(array $params) |
|
| 63 | - { |
|
| 64 | - return $this->api->post($this->url, $params); |
|
| 65 | - } |
|
| 62 | + public function addCustomBitlink(array $params) |
|
| 63 | + { |
|
| 64 | + return $this->api->post($this->url, $params); |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - /* |
|
| 67 | + /* |
|
| 68 | 68 | Get Metrics for a Custom Bitlink by destination |
| 69 | 69 | https://dev.bitly.com/v4/#operation/getCustomBitlinkMetricsByDestination |
| 70 | 70 | */ |
| 71 | - public function getCustomBitlinkMetricsByDestination(string $custom_bitlink) |
|
| 72 | - { |
|
| 73 | - return $this->api->get($this->url . '/'.$custom_bitlink.'/clicks_by_destination'); |
|
| 74 | - } |
|
| 71 | + public function getCustomBitlinkMetricsByDestination(string $custom_bitlink) |
|
| 72 | + { |
|
| 73 | + return $this->api->get($this->url . '/'.$custom_bitlink.'/clicks_by_destination'); |
|
| 74 | + } |
|
| 75 | 75 | |
| 76 | 76 | } |
@@ -26,12 +26,12 @@ discard block |
||
| 26 | 26 | use PHPLicengine\Exception\CurlException; |
| 27 | 27 | use PHPLicengine\Api\ApiInterface; |
| 28 | 28 | |
| 29 | -class Custom { |
|
| 29 | +class Custom { |
|
| 30 | 30 | |
| 31 | 31 | private $url; |
| 32 | 32 | private $api; |
| 33 | 33 | |
| 34 | - public function __construct (ApiInterface $api) |
|
| 34 | + public function __construct(ApiInterface $api) |
|
| 35 | 35 | { |
| 36 | 36 | $this->api = $api; |
| 37 | 37 | $this->url = 'https://api-ssl.bitly.com/v4/custom_bitlinks'; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function updateCustomBitlink(string $custom_bitlink, array $params) |
| 45 | 45 | { |
| 46 | - return $this->api->patch($this->url . '/'.$custom_bitlink, $params); |
|
| 46 | + return $this->api->patch($this->url.'/'.$custom_bitlink, $params); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /* |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function getCustomBitlink(string $custom_bitlink) |
| 54 | 54 | { |
| 55 | - return $this->api->get($this->url . '/'.$custom_bitlink); |
|
| 55 | + return $this->api->get($this->url.'/'.$custom_bitlink); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /* |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function getCustomBitlinkMetricsByDestination(string $custom_bitlink) |
| 72 | 72 | { |
| 73 | - return $this->api->get($this->url . '/'.$custom_bitlink.'/clicks_by_destination'); |
|
| 73 | + return $this->api->get($this->url.'/'.$custom_bitlink.'/clicks_by_destination'); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | } |
@@ -28,22 +28,22 @@ |
||
| 28 | 28 | |
| 29 | 29 | class Bsd { |
| 30 | 30 | |
| 31 | - private $url; |
|
| 32 | - private $api; |
|
| 31 | + private $url; |
|
| 32 | + private $api; |
|
| 33 | 33 | |
| 34 | - public function __construct (ApiInterface $api) |
|
| 35 | - { |
|
| 36 | - $this->api = $api; |
|
| 37 | - $this->url = 'https://api-ssl.bitly.com/v4/bsds'; |
|
| 38 | - } |
|
| 34 | + public function __construct (ApiInterface $api) |
|
| 35 | + { |
|
| 36 | + $this->api = $api; |
|
| 37 | + $this->url = 'https://api-ssl.bitly.com/v4/bsds'; |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - /* |
|
| 40 | + /* |
|
| 41 | 41 | Get BSDs |
| 42 | 42 | https://dev.bitly.com/v4/#operation/getBSDs |
| 43 | 43 | */ |
| 44 | - public function getBSDs() |
|
| 45 | - { |
|
| 46 | - return $this->api->get($this->url); |
|
| 47 | - } |
|
| 44 | + public function getBSDs() |
|
| 45 | + { |
|
| 46 | + return $this->api->get($this->url); |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | 49 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | private $url; |
| 32 | 32 | private $api; |
| 33 | 33 | |
| 34 | - public function __construct (ApiInterface $api) |
|
| 34 | + public function __construct(ApiInterface $api) |
|
| 35 | 35 | { |
| 36 | 36 | $this->api = $api; |
| 37 | 37 | $this->url = 'https://api-ssl.bitly.com/v4/bsds'; |
@@ -28,22 +28,22 @@ |
||
| 28 | 28 | |
| 29 | 29 | class App { |
| 30 | 30 | |
| 31 | - private $url; |
|
| 32 | - private $api; |
|
| 31 | + private $url; |
|
| 32 | + private $api; |
|
| 33 | 33 | |
| 34 | - public function __construct (ApiInterface $api) |
|
| 35 | - { |
|
| 36 | - $this->api = $api; |
|
| 37 | - $this->url = 'https://api-ssl.bitly.com/v4/apps'; |
|
| 38 | - } |
|
| 34 | + public function __construct (ApiInterface $api) |
|
| 35 | + { |
|
| 36 | + $this->api = $api; |
|
| 37 | + $this->url = 'https://api-ssl.bitly.com/v4/apps'; |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - /* |
|
| 40 | + /* |
|
| 41 | 41 | Retrieve OAuth App |
| 42 | 42 | https://dev.bitly.com/v4/#operation/getOAuthApp |
| 43 | 43 | */ |
| 44 | - public function getOAuthApp(string $client_id) |
|
| 45 | - { |
|
| 46 | - return $this->api->get($this->url . '/'.$client_id); |
|
| 47 | - } |
|
| 44 | + public function getOAuthApp(string $client_id) |
|
| 45 | + { |
|
| 46 | + return $this->api->get($this->url . '/'.$client_id); |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | 49 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | private $url; |
| 32 | 32 | private $api; |
| 33 | 33 | |
| 34 | - public function __construct (ApiInterface $api) |
|
| 34 | + public function __construct(ApiInterface $api) |
|
| 35 | 35 | { |
| 36 | 36 | $this->api = $api; |
| 37 | 37 | $this->url = 'https://api-ssl.bitly.com/v4/apps'; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function getOAuthApp(string $client_id) |
| 45 | 45 | { |
| 46 | - return $this->api->get($this->url . '/'.$client_id); |
|
| 46 | + return $this->api->get($this->url.'/'.$client_id); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | } |