Story

  • Story
HTTP Method : POST(create)/PUT(update)
URI : /story

    • Request
 Parameters  Description  Example
 name  이름  경복궁
 desc  HTML로 작성된 관련 설명  경복궁(景福宮)은 대한민국 서울 세종로에 있는 조선 왕조의 법궁(法宮, 정궁)이다.
 POIs  Story와 연관된 POI의 URI  ["http://www.tourcloud.org/dpoi/85c29b53-1638-43e0-8805-df2761b19afb",
 tags  Story와 연관된 tag  ["고궁", "경복궁", "조선"]
    • Response
 Status  Description
 OK  view 페이지로 redirect
 ERROR  error message return
  • Retrieve Content
콘텐츠를 조회하기 위한 방법으로 동일한 uri-template을 가진다.

HTTP Method : GET 
URI : /story/:contentid
    • Request
parameter 없음
    • Response
* Accept : text/html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title> KIST </title>
  <link rel="stylesheet" type="text/css" href="http://www.tourcloud.org/external/timesheet/layout.css">
  <style type="text/css">
    seq { display: block; }
  </style>
  <script type="text/javascript" src="http://www.tourcloud.org/external/timesheet/timesheets.js"></script>
</head>
<body class="crossfade">
 <div id="banner" class="highlight" timeContainer="seq" repeatCount="indefinite">
  <img dur="5s" src="http://www.tourcloud.org/media/1f75f014-b13f-4809-9c17-703440eefacf">
  <img dur="3s" src="http://www.tourcloud.org/media/6ec0232c-80a0-46c6-80fe-692ead78197b">
  <img dur="3s" src="http://www.tourcloud.org/media/133e966e-973e-4a6e-be8c-d2a814602bd3">
  <img dur="3s" src="http://www.tourcloud.org/media/e85d581e-18d1-4d1c-8a68-cf12c160ed22">
  <img dur="3s" src="http://www.tourcloud.org/media/0a5f3674-2dba-4783-bac9-825991884e2b">
 </div>
</body>
</html>


* Accept : application/json

{
  _id: "54c5a766414598bb7064fc17"
  uuid: "9e013ffc-8a63-44c2-81b3-ac224ab944c4"
  name: "KIST L8 for google glass"
  author: "anonymous"
  desc: "<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title> KIST </title> <link rel="stylesheet" type="text/css" href="http://www.tourcloud.org/external/timesheet/layout.css"> <style type="text/css"> seq { display: block; } </style> <script type="text/javascript" src="http://www.tourcloud.org/external/timesheet/timesheets.js"></script> </head> <body class="crossfade"> <div id="banner" class="highlight" timeContainer="seq" repeatCount="indefinite"> <img dur="5s" src="http://tourcloud.org/media/1f75f014-b13f-4809-9c17-703440eefacf"> <img dur="3s" src="http://tourcloud.org/media/6ec0232c-80a0-46c6-80fe-692ead78197b"> <img dur="3s" src="http://tourcloud.org/media/133e966e-973e-4a6e-be8c-d2a814602bd3"> <img dur="3s" src="http://tourcloud.org/media/e85d581e-18d1-4d1c-8a68-cf12c160ed22"> <img dur="3s" src="http://tourcloud.org/media/0a5f3674-2dba-4783-bac9-825991884e2b"> </div> </body> </html>"
  __v: 0
  revision: 1
  changed: "2015-01-26T02:33:10.118Z"
  created: "2015-01-26T02:33:10.118Z"
  access: [1]
  0:  "Public"
 -
  tags: null
  POIs: null
  storytype: "HTML"
}


  • Delete Content
HTTP Method : DELETE
URI : /story/:contentid
      • Request
    parameter 없음
      • Reponse
     Status  Description
     OK  view 페이지로 redirect
     ERROR  error message return

    • Search Content
    HTTP Method : GET 
    URI : /story
      • Request
     Parameters  Description  Example
     region  POI가 포함되는 영역(location 과 exclusive)  {"type": "Polygon","coordinates": [[126.97379730926367,37.58326714052456],[126.97388313995633,37.579713112229854]]}
     location  사용자가 지정하는 한 점(region과 exclusive)  {"type": "Point","coordinates": [126.97697304473937,37.57853973549271]}
     spatialop  region or location 에 대한 spatial operator  geoWithin
     spatialtarget  spatial operator 를 적용할 대상  region
     keyword  content 제목 중 keyword 를 포함  경복궁
     lod.server  true인 경우 하위 lod server까지 검색  true
     limit  한번에 paging 할 최대 record 갯수  12
     start  paging start index  1
      • Response
    * Accept : application/json
    [
        {
            "source": "tourcloud.org",
            "contenttype": "story",
            "doc": [
                {
                    "_id": "54c5a6c7414598bb7064fc16",
                    "uuid": "a0c81dd8-fa6c-4d33-86c3-0bc4539871cb",
                    "name": "KIST L1 for google glass",
                    "author": "anonymous",
                    "desc": "<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n  <meta charset=\"utf-8\">\r\n  <title> KIST </title>\r\n  <link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.tourcloud.org/external/timesheet/layout.css\">\r\n  <style type=\"text/css\">\r\n    seq { display: block; }\r\n  </style>\r\n  <script type=\"text/javascript\" src=\"http://www.tourcloud.org/external/timesheet/timesheets.js\"></script>\r\n</head>\r\n<body class=\"crossfade\">\r\n\t<div id=\"banner\" class=\"highlight\" timeContainer=\"seq\" repeatCount=\"indefinite\">\r\n\t\t<img dur=\"5s\" src=\"http://tourcloud.org/media/245945a7-b5f5-417c-91e5-8d96f6a8b899\">\r\n\t\t<img dur=\"3s\" src=\"http://tourcloud.org/media/4c4b8d39-6924-4a5a-93e5-92dc9713ad68\">\r\n\t\t<img dur=\"3s\" src=\"http://tourcloud.org/media/439696a4-9421-4665-8116-e7d46fb61a18\">\r\n\t\t<img dur=\"3s\" src=\"http://tourcloud.org/media/25df9681-89c7-49aa-ad18-70904cd2ef57\">\r\n\t</div>\r\n</body>\r\n</html>",
                    "__v": 0,
                    "revision": 1,
                    "changed": "2015-01-26T02:30:31.826Z",
                    "created": "2015-01-26T02:30:31.826Z",
                    "access": [
                        "Public"
                    ],
                    "tags": null,
                    "POIs": null,
                    "storytype": "HTML"
                }
            ]
        }
    ]