GET /api/anwser.php
Parameter
pretty
: [true
|false
] Pretty print JSON output.
Get a random answer.
$ curl -XGET "https://hastdueier.de/api/answer.php?pretty=true"
{
"found": false,
"headline": "Nein. 😔",
"description": "Schade! Denn: Eier! Wir brauchen Eier!",
"mediaUrl": "https: //img.youtube.com\/vi\/GMnBOQAxe4c\/0.jpg",
"mediaEmbed": "<iframe width=\"533\" height=\"300\" src=\"https://www.youtube.com\/embed\/GMnBOQAxe4c?autoplay=1&rel=0&controls=0\" frameborder=\"0\" allowfullscreen><\/iframe>"
}
-
Run container
docker build -t hastdueier .
docker run -p 8000:80 hastdueier
- Open
open https://localhost:8000
The codestyle of hastdueier is enforced by PHP_CodeSniffer.
To check the code Composer has to be installed. Afterwards all dependencies have to be installed by running composer install
on the command line. Now the codestyle can be checked by running composer cs
.