Page 리소스
Page 리소스
읽기전용 리소스
- identifier: 페이지 고유 ID
예) 1
- date_created: 페이지 최초 생성 일시(UTC)
예) 2008-01-30T10:11:16Z
- date_modified: 페이지 최종 수정 일시(UTC)
예) 2008-01-30T10:11:16Z
- rights: 페이지에 설정된 Creative Commons License
예) by-nc
- creator: 페이지 소유자 Open ID
- contributor_modified: 최종 수정자 Open ID
쓰기가능 리소스
- title: 페이지 이름
예) TestPage
-
source: 페이지 원본.
-
주의: 페이지 내용은 XML 스키마 타입으로 string만 들어와야 합니다. 따라서 태그는 들어올 수 없으며, 반드시 엔티티 이스케이프 처리를 해서 보내야 합니다.
- 예) <p> hello </p>로 넣으면 안되고, <p> hello </p> 와 같이 넣으세요.
-
- relation_is_part_of: 이 페이지의 부모 페이지의 ID
예) 2
-
tags: 페이지에 붙은 태그:
예) tag1,tag2
XML
- <page>
<identifier type="integer">4</identifier>
<title>TestPage</title>
<source><p>None</p></source>
<relation_is_part_of type="integer">1</relation_is_part_of>
<date_created type="datetime">2007-10-26T05:30:08Z</date_created>
<date_modified type="datetime">2008-01-08T10:55:36Z</date_modified>
<creator>http://deepblue.myid.net/</creator>
<contributor_modified>http://deepblue.myid.net/</contributor_modified>
<tags>test</tags>
</page>
JSON
- {"page": {
"rights": null,
"source": "\u003Cp\u003ENone\u003C/p\u003E\n",
"creator": "http://deepblue.myid.net/",
"date_created": "2007/10/26 05:30:08 +0000",
"contributor_modified": "http://deepblue.myid.net/",
"date_modified": "2008/01/08 10:55:36 +0000",
"relation_is_part_of": 1,
"identifier": 4,
"tags": "test",
"title": "TestPage"
}}
요청
특정 페이지 읽기
- GET /pages/#{id}.xml
특정 페이지 수정
- PUT /pages/#{id}.xml
- 페이지 리소스를 함께 담아 요청한다
특정 페이지 삭제
- DELETE /pages/#{id}.xml
페이지 생성
- POST /pages
- 페이지 리소스를 함께 담아 요청한다
페이지 목록
- GET /pages.xml
-
선택적으로 사용할 수 있는 파라메터
-
sort
- 정렬 기준으로 사용할 필드, identifier | title | relation_is_par_of | date_modified | date_created 중 하나를 선택,
- ex> https://api.springnote.com/pages.xml?sort=date_modified => 수정된 날짜 기준으로 정렬 요청
-
order
- 응답 페이지 정렬 순서, desc | asc 중 하나.
- ex> https://api.springnote.com/pages.xml?sort=date_modified&order=desc => 최신 페이지 요청
-
offset
- 응답 페이지 리스트의 offset정의
- ex> https://api.springnote.com/pages.xml?sort=date_modified&offset=10 => 최신 페이지 중 10번째 페이지부터 요청
-
count
- 응답페이지 리스트의 크기 정의
- ex> https://api.springnote.com/pages.xml?sort=date_modified&count=10 => 최신 페이지 10개만 요청
-
parent_id
- 특정 페이지의 하위 페이지만을 반환한다
- ex> https://api.springnote.com/pages.xml?parent_id=1234
-
q
- 검색을 수행합니다
- ex> https://api.springnote.com/pages.xml?q=test
-
tags
- 특정 태그를 포함하는 페이지를 반환한다
- ex>https://api.springnote.com/pages.xml?tags=spring
-
identifiers
- CSV로 제공하면, ID가 매칭되는 페이지만 반환한다
- ex> https://api.springnote.com/pages.xml?identifiers=1,2
-
History
Last edited on 11/07/2008 14:42 by deepblue
Comments (0)