Given Event Details resource is accessible
And Event Details resource is accessible
When the client request the Event Details in JSON
Then the Web API should return Event Details in JSON
{ | |
"url": "http://example.com/event/511206849146c42125000001", | |
"data": { | |
"title": "Free event", | |
"shortDescription": "Free event for students", | |
"times": [ | |
{ | |
"milliseconds": 1613028781634, | |
"fullFormat": "Thu Feb 11 2021 14:33:01 GMT+0700 (WIT)", | |
"year": 2021, |
{ | |
"url": "http://example.com/events", | |
"data": [ | |
{ | |
"title": "Free event", | |
"shortDescription": "Free event for students", | |
"times": [ | |
{ | |
"milliseconds": 1613028781634, | |
"fullFormat": "Thu Feb 11 2021 14:33:01 GMT+0700 (WIT)", |
<response> | |
<url>http://localhost:3000/event1</url> | |
<data id="1"> | |
<title>Diam nisl tation.</title> | |
<shortDescription>Amet dolore praesent consequat te.</shortDescription> | |
<times> | |
<time> | |
<milliseconds>1613028781634</milliseconds> | |
<fullFormat>Thu Feb 11 2021 14:33:01 GMT+0700 (WIT)</fullFormat> | |
<year>2021</year> |
<response> | |
<url>http://localhost:3000/events</url> | |
<data> | |
<data id="1"> | |
<title>Diam nisl tation.</title> | |
<shortDescription>Amet dolore praesent consequat te.</shortDescription> | |
<times> | |
<time> | |
<milliseconds>1613028781634</milliseconds> |
/** | |
* A middleware to check the requested content type. | |
* Note: | |
* Just be sure to place the middleware before: | |
* app.use(app.router); | |
*/ | |
module.exports.acceptedContentType = function () { | |
return function (req, res, next) { |
http://ghanozjson.ap01.aws.af.cm/event/1
Accept: application/json
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
http://ghanozjson.ap01.aws.af.cm/events
Accept: application/json
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
.
├── app
│ ├── app.js
│ ├── configs
│ ├── middlewares
│ ├── routes
│ └── utils
├── CHANGELOG.md
├── doc