Skip to content

Commit 1b9a7e0

Browse files
committed
up
1 parent eb36cba commit 1b9a7e0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ after theses lines, you call the functions.
2727

2828
`$client->registerUser('username', 'email', 'fr', 'https://graphcomment.com/image.jpg');`
2929

30-
This function return a json file containing its "gc_id" that must be save in your database to authenticate a user that is logging in.
30+
This function return a json file containing its "gc_id" that must be save in your database to authenticate a user that is logging in and do_sync date of synchronisation to save too.
3131

3232
- login a User, this function return the token JWT as JSON that you must save in localStorage to authenticate Graphcomment.
3333

@@ -60,13 +60,15 @@ get user's informations, return a JSON.
6060
username: 'username',
6161
6262
language : 'en',
63-
picture : 'https://graphcomment.com/image.jpg'
63+
picture : 'https://graphcomment.com/image.jpg',
64+
do_sync : date of synchronisation
6465
}
6566
```
6667
- Update a User on Graphcomment
6768

6869
`$client->updateUser('gc_id', 'username', 'email', 'fr', 'https://graphcomment.com/image.jpg');`
6970

71+
return do_sync date and gc_id with state 'updated'
7072

7173
- Count Comments of a thread
7274

src/Graphcomment.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function setDir($dir)
9292
* @param string $language (optionnal) default value : en (codes ISO 639-1)
9393
* @param string $picture (full url only example : https://graphcomment.com/image.jpg)
9494
*
95-
* @return object json response gc_id to store in your database
95+
* @return object json response gc_id to store in your database and do_sync which define date of synchronisation
9696
*/
9797
public function registerUser($username, $email, $language = "en", $picture = '')
9898
{
@@ -138,10 +138,7 @@ public function loginUser($gc_id)
138138
* getUser() return the informations that we have on the user
139139
*
140140
* @param $gc_id
141-
* @return object JSON {
142-
*
143-
*
144-
* }
141+
* @return object JSON with do_sync date, if changed, you must synchronise the informations.
145142
*/
146143
public function getUser($gc_id)
147144
{
@@ -168,6 +165,7 @@ public function getUser($gc_id)
168165
*
169166
* @return object JSON {
170167
* gc_id : data.gc_id,
168+
* do_sync : date of synchronisation
171169
* res :'updated'
172170
* } or {
173171
* gc_id : data.gc_id,

0 commit comments

Comments
 (0)