-
composer install
-
php bin/console doctrine:database:create
-
php bin/console doctrine:schema:create
-
php bin/console hautelook_alice:doctrine:fixtures:load
-
php bin/console server:run (local php server on http://127.0.0.1:8000)
-
configuration for apache or nginx see http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html
-
php bin/console doctrine:database:create --env=test
-
php bin/console doctrine:schema:create --env=test
-
php bin/console hautelook_alice:doctrine:fixtures:load --env=test
-
./vendor/bin/phpunit
-
PHP_CodeSniffer: ./vendor/bin/phpcs --standard=psr2 src
-
PHP Mess Detector: ./vendor/bin/phpmd src text cleancode,codesize,controversial,design,unusedcode
-
PHP Copy/Paste Detector: ./vendor/bin/phpcpd src
Example:
GET /bookmark
Response:
[
{
"uid": 1,
"createdAt": "2016-06-16T15:37:31+03:00",
"url": "http://google.com",
"comments": []
},
{
"uid": 2,
"createdAt": "2016-06-15T23:39:26+03:00",
"url": "http://www.howe.com/culpa-rem-aut-rerum-exercitationem-est-rem",
"comments": [
{
"uid": 1,
"createdAt": "2016-06-14T07:13:44+03:00",
"ip": "218.230.103.77",
"text": "Similique ad sed architecto quod nulla. Voluptas quibusdam inventore esse harum accusantium rerum nulla.",
"bookmark": 2,
"changeableAndDeletable": false
},
...
},
...
]
Format:
GET /bookmark/{url}
Example:
GET /bookmark/http://google.com
Response:
{
"uid": 1,
"createdAt": "2016-06-16T14:43:20+03:00",
"url": "http://google.com",
"comments": [
{
"uid": 1,
"createdAt": "2016-06-14T07:13:44+03:00",
"ip": "218.230.103.77",
"text": "Similique ad sed architecto quod nulla. Voluptas quibusdam inventore esse harum accusantium rerum nulla.",
"bookmark": 1,
"changeableAndDeletable": false
},
...
]
}
Example:
POST /bookmark
{"url": "http://google.com"}
Response:
{
"uid": 1
}
Format:
POST /bookmark/{uid}/comment
{"text": "comment text"}
Example:
POST /bookmark/1/comment
{"text": "comment text"}
Response:
{
"uid": 1
}
Format:
PUT /comment/{uid}
{"text": "comment text"}
Example:
POST /comment/1
{"text": "comment text"}
Response:
{
"uid": 1
}
Format:
DELETE /comment/{uid}
Example:
DELETE /comment/1