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