|
@@ -104,7 +104,7 @@ discard block |
|
|
block discarded – undo |
|
104
|
104
|
"picture" => $picture // (optionnal) full url only |
|
105
|
105
|
); |
|
106
|
106
|
|
|
107
|
|
- $res = $client->request('POST', $this->getDir() . '/pub/sso/registerUser/pubkey/' . $this->getGcPublic() . '/key/' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
|
107
|
+ $res = $client->request('POST', $this->getDir() . '/pub/sso/registerUser/pubkey/' . $this->getGcPublic() . '/key/' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
|
108
|
108
|
|
|
109
|
109
|
if ($res->getStatusCode() == "200") { |
|
110
|
110
|
return $res->getBody(); |
|
@@ -128,7 +128,7 @@ discard block |
|
|
block discarded – undo |
|
128
|
128
|
"gc_id" => $gc_id |
|
129
|
129
|
); |
|
130
|
130
|
|
|
131
|
|
- $res = $client->request('POST', $this->getDir() . '/pub/sso/loginUser/pubkey/' . $this->getGcPublic(). '/key/' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
|
131
|
+ $res = $client->request('POST', $this->getDir() . '/pub/sso/loginUser/pubkey/' . $this->getGcPublic() . '/key/' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
|
132
|
132
|
|
|
133
|
133
|
return $res->getBody(); |
|
134
|
134
|
} |
|
@@ -148,7 +148,7 @@ discard block |
|
|
block discarded – undo |
|
148
|
148
|
"gc_id" => $gc_id |
|
149
|
149
|
); |
|
150
|
150
|
|
|
151
|
|
- $res = $client->request('GET', $this->getDir() . '/pub/sso/getUser/pubkey/' . $this->getGcPublic(). '/key/' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
|
151
|
+ $res = $client->request('GET', $this->getDir() . '/pub/sso/getUser/pubkey/' . $this->getGcPublic() . '/key/' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
|
152
|
152
|
|
|
153
|
153
|
return $res->getBody(); |
|
154
|
154
|
} |
|
@@ -184,7 +184,7 @@ discard block |
|
|
block discarded – undo |
|
184
|
184
|
"picture" => $picture |
|
185
|
185
|
); |
|
186
|
186
|
|
|
187
|
|
- $res = $client->request('PUT', $this->getDir() . '/pub/sso/updateUser/pubkey/' . $this->getGcPublic(). '/key/' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
|
187
|
+ $res = $client->request('PUT', $this->getDir() . '/pub/sso/updateUser/pubkey/' . $this->getGcPublic() . '/key/' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
|
188
|
188
|
|
|
189
|
189
|
return $res->getBody(); |
|
190
|
190
|
} |
|
@@ -201,7 +201,7 @@ discard block |
|
|
block discarded – undo |
|
201
|
201
|
{ |
|
202
|
202
|
$client = new Client(); |
|
203
|
203
|
|
|
204
|
|
- $res = $client->request('DELETE', $this->getDir() . '/pub/sso/deleteProfileByGcId/pubkey/' . $this->getGcPublic(). '/key/' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
|
204
|
+ $res = $client->request('DELETE', $this->getDir() . '/pub/sso/deleteProfileByGcId/pubkey/' . $this->getGcPublic() . '/key/' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
|
205
|
205
|
|
|
206
|
206
|
return $res->getBody(); |
|
207
|
207
|
} |
|
@@ -215,7 +215,7 @@ discard block |
|
|
block discarded – undo |
|
215
|
215
|
* @param string $uid (unique id of the thread) optionnal |
|
216
|
216
|
* @return object json {count: numberOfComments } |
|
217
|
217
|
*/ |
|
218
|
|
- public function countComments($url, $uid='') { |
|
|
218
|
+ public function countComments($url, $uid = '') { |
|
219
|
219
|
$client = new Client(); |
|
220
|
220
|
|
|
221
|
221
|
$data = array( |
|
@@ -223,7 +223,7 @@ discard block |
|
|
block discarded – undo |
|
223
|
223
|
"uid" => $uid |
|
224
|
224
|
); |
|
225
|
225
|
|
|
226
|
|
- $res = $client->request('GET', $this->getDir() . '/pub/sso/numberOfComments/pubkey/' . $this->getGcPublic(). '/key/' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
|
226
|
+ $res = $client->request('GET', $this->getDir() . '/pub/sso/numberOfComments/pubkey/' . $this->getGcPublic() . '/key/' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
|
227
|
227
|
|
|
228
|
228
|
return $res->getBody(); |
|
229
|
229
|
} |
|
@@ -236,7 +236,7 @@ discard block |
|
|
block discarded – undo |
|
236
|
236
|
public function exportComments() { |
|
237
|
237
|
$client = new Client(); |
|
238
|
238
|
|
|
239
|
|
- $res = $client->request('GET', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic(). '/key/' . $this->generateSsoData('key'), ['http_errors' => false, 'timeout' => 5]); |
|
|
239
|
+ $res = $client->request('GET', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic() . '/key/' . $this->generateSsoData('key'), [ 'http_errors' => false, 'timeout' => 5 ]); |
|
240
|
240
|
|
|
241
|
241
|
return $res->getBody(); |
|
242
|
242
|
} |
|
@@ -253,7 +253,7 @@ discard block |
|
|
block discarded – undo |
|
253
|
253
|
|
|
254
|
254
|
$data = $commentIds; |
|
255
|
255
|
|
|
256
|
|
- $res = $client->request('POST', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic(). '/key/' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
|
256
|
+ $res = $client->request('POST', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic() . '/key/' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
|
257
|
257
|
|
|
258
|
258
|
return $res->getBody(); |
|
259
|
259
|
} |