| @@ 168-176 (lines=9) @@ | ||
| 165 | /** |
|
| 166 | * GET wrapper for oAuthRequest. |
|
| 167 | */ |
|
| 168 | public function get($url, $parameters = []) |
|
| 169 | { |
|
| 170 | $response = $this->oAuthRequest($url, 'GET', $parameters); |
|
| 171 | if ($this->format === 'json' && $this->decode_json) { |
|
| 172 | return json_decode($response); |
|
| 173 | } |
|
| 174 | ||
| 175 | return $response; |
|
| 176 | } |
|
| 177 | ||
| 178 | /** |
|
| 179 | * POST wrapper for oAuthRequest. |
|
| @@ 181-189 (lines=9) @@ | ||
| 178 | /** |
|
| 179 | * POST wrapper for oAuthRequest. |
|
| 180 | */ |
|
| 181 | public function post($url, $parameters = []) |
|
| 182 | { |
|
| 183 | $response = $this->oAuthRequest($url, 'POST', $parameters); |
|
| 184 | if ($this->format === 'json' && $this->decode_json) { |
|
| 185 | return json_decode($response); |
|
| 186 | } |
|
| 187 | ||
| 188 | return $response; |
|
| 189 | } |
|
| 190 | ||
| 191 | /** |
|
| 192 | * DELETE wrapper for oAuthReqeust. |
|
| @@ 194-202 (lines=9) @@ | ||
| 191 | /** |
|
| 192 | * DELETE wrapper for oAuthReqeust. |
|
| 193 | */ |
|
| 194 | public function delete($url, $parameters = []) |
|
| 195 | { |
|
| 196 | $response = $this->oAuthRequest($url, 'DELETE', $parameters); |
|
| 197 | if ($this->format === 'json' && $this->decode_json) { |
|
| 198 | return json_decode($response); |
|
| 199 | } |
|
| 200 | ||
| 201 | return $response; |
|
| 202 | } |
|
| 203 | ||
| 204 | /** |
|
| 205 | * Format and sign an OAuth / API request. |
|