@@ -28,6 +28,10 @@ discard block |
||
28 | 28 | 'expand' |
29 | 29 | ); |
30 | 30 | |
31 | + /** |
|
32 | + * @param string $login |
|
33 | + * @param string $apiKey |
|
34 | + */ |
|
31 | 35 | public function Bitly($login, $apiKey) |
32 | 36 | { |
33 | 37 | $this->login = $login; |
@@ -115,6 +119,10 @@ discard block |
||
115 | 119 | return $this->process('stats', $postFields); |
116 | 120 | } |
117 | 121 | |
122 | + /** |
|
123 | + * @param string $action |
|
124 | + * @param string $postFields |
|
125 | + */ |
|
118 | 126 | protected function process($action, $postFields) { |
119 | 127 | $ch = curl_init( $this->api . $action); |
120 | 128 | |
@@ -134,6 +142,9 @@ discard block |
||
134 | 142 | return $response; |
135 | 143 | } |
136 | 144 | |
145 | + /** |
|
146 | + * @param string $format |
|
147 | + */ |
|
137 | 148 | public function setReturnFormat($format) |
138 | 149 | { |
139 | 150 | // needed for restoration |
@@ -15,12 +15,19 @@ |
||
15 | 15 | private $debug = false; |
16 | 16 | public $error = false; |
17 | 17 | |
18 | + /** |
|
19 | + * @param string $user |
|
20 | + * @param string $pass |
|
21 | + */ |
|
18 | 22 | function __construct($user, $pass, $debug=false) { |
19 | 23 | // Store an auth key for the HTTP Authorization: header |
20 | 24 | $this->auth = base64_encode($user . ':' . $pass); |
21 | 25 | $this->debug = $debug; |
22 | 26 | } |
23 | 27 | |
28 | + /** |
|
29 | + * @param string $new_status |
|
30 | + */ |
|
24 | 31 | function update($new_status) { |
25 | 32 | if (strlen($new_status) > 140) { |
26 | 33 | $this->error = "Status too long: {$new_status}."; |