|
@@ -106,7 +106,7 @@ discard block |
|
|
block discarded – undo |
106
|
106
|
"picture" => $picture // (optionnal) full url only |
107
|
107
|
); |
108
|
108
|
|
109
|
|
- $res = $client->request('POST', $this->getDir() . '/pub/sso/registerUser/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
109
|
+ $res = $client->request('POST', $this->getDir() . '/pub/sso/registerUser/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
110
|
110
|
|
111
|
111
|
if ($res->getStatusCode() == "200") { |
112
|
112
|
return $res->getBody(); |
|
@@ -131,7 +131,7 @@ discard block |
|
|
block discarded – undo |
131
|
131
|
"gc_id" => $gc_id |
132
|
132
|
); |
133
|
133
|
|
134
|
|
- $res = $client->request('POST', $this->getDir() . '/pub/sso/loginUser/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
134
|
+ $res = $client->request('POST', $this->getDir() . '/pub/sso/loginUser/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
135
|
135
|
|
136
|
136
|
return $res->getBody(); |
137
|
137
|
} |
|
@@ -152,7 +152,7 @@ discard block |
|
|
block discarded – undo |
152
|
152
|
"gc_id" => $gc_id |
153
|
153
|
); |
154
|
154
|
|
155
|
|
- $res = $client->request('GET', $this->getDir() . '/pub/sso/getUser/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
155
|
+ $res = $client->request('GET', $this->getDir() . '/pub/sso/getUser/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
156
|
156
|
|
157
|
157
|
return $res->getBody(); |
158
|
158
|
} |
|
@@ -189,7 +189,7 @@ discard block |
|
|
block discarded – undo |
189
|
189
|
"picture" => $picture |
190
|
190
|
); |
191
|
191
|
|
192
|
|
- $res = $client->request('PUT', $this->getDir() . '/pub/sso/updateUser/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
192
|
+ $res = $client->request('PUT', $this->getDir() . '/pub/sso/updateUser/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
193
|
193
|
|
194
|
194
|
return $res->getBody(); |
195
|
195
|
} |
|
@@ -210,7 +210,7 @@ discard block |
|
|
block discarded – undo |
210
|
210
|
$data = array( |
211
|
211
|
"gc_id" => $gc_id); |
212
|
212
|
|
213
|
|
- $res = $client->request('DELETE', $this->getDir() . '/pub/sso/deleteProfileByGcId/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
213
|
+ $res = $client->request('DELETE', $this->getDir() . '/pub/sso/deleteProfileByGcId/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
214
|
214
|
|
215
|
215
|
return $res->getBody(); |
216
|
216
|
} |
|
@@ -224,7 +224,7 @@ discard block |
|
|
block discarded – undo |
224
|
224
|
* @return object json {count: numberOfComments } |
225
|
225
|
* @throws GuzzleException |
226
|
226
|
*/ |
227
|
|
- public function countComments($url, $uid='') { |
|
227
|
+ public function countComments($url, $uid = '') { |
228
|
228
|
$client = new Client(); |
229
|
229
|
|
230
|
230
|
$data = array( |
|
@@ -232,7 +232,7 @@ discard block |
|
|
block discarded – undo |
232
|
232
|
"uid" => $uid |
233
|
233
|
); |
234
|
234
|
|
235
|
|
- $res = $client->request('GET', $this->getDir() . '/pub/sso/numberOfComments/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
235
|
+ $res = $client->request('GET', $this->getDir() . '/pub/sso/numberOfComments/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
236
|
236
|
|
237
|
237
|
return $res->getBody(); |
238
|
238
|
} |
|
@@ -246,7 +246,7 @@ discard block |
|
|
block discarded – undo |
246
|
246
|
* @return object json-ld |
247
|
247
|
* @throws GuzzleException |
248
|
248
|
*/ |
249
|
|
- public function getThreadJsonLdFormat($url, $uid='', $pageId='') { |
|
249
|
+ public function getThreadJsonLdFormat($url, $uid = '', $pageId = '') { |
250
|
250
|
$client = new Client(); |
251
|
251
|
|
252
|
252
|
$data = array( |
|
@@ -255,7 +255,7 @@ discard block |
|
|
block discarded – undo |
255
|
255
|
"page_id" => $pageId |
256
|
256
|
); |
257
|
257
|
|
258
|
|
- $res = $client->request('GET', $this->getDir() . '/pub/sso/thread-jsonld/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
258
|
+ $res = $client->request('GET', $this->getDir() . '/pub/sso/thread-jsonld/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
259
|
259
|
|
260
|
260
|
return $res->getBody(); |
261
|
261
|
} |
|
@@ -269,7 +269,7 @@ discard block |
|
|
block discarded – undo |
269
|
269
|
public function exportComments() { |
270
|
270
|
$client = new Client(); |
271
|
271
|
|
272
|
|
- $res = $client->request('GET', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData('key'), ['http_errors' => false, 'timeout' => 5]); |
|
272
|
+ $res = $client->request('GET', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData('key'), [ 'http_errors' => false, 'timeout' => 5 ]); |
273
|
273
|
|
274
|
274
|
return $res->getBody(); |
275
|
275
|
} |
|
@@ -287,7 +287,7 @@ discard block |
|
|
block discarded – undo |
287
|
287
|
|
288
|
288
|
$data = $commentIds; |
289
|
289
|
|
290
|
|
- $res = $client->request('POST', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic(). '?key=' . $this->generateSsoData($data), ['http_errors' => false, 'timeout' => 5]); |
|
290
|
+ $res = $client->request('POST', $this->getDir() . '/pub/export-comments/pubkey/' . $this->getGcPublic() . '?key=' . $this->generateSsoData($data), [ 'http_errors' => false, 'timeout' => 5 ]); |
291
|
291
|
|
292
|
292
|
return $res->getBody(); |
293
|
293
|
} |