├── .editorconfig
├── .gitignore
├── .idea
├── .gitignore
├── jpa-buddy.xml
├── misc.xml
├── modules.xml
└── vcs.xml
├── GLOSSARY.md
├── README.md
├── SUMMARY.md
├── apis
├── README.md
└── v1
│ ├── blog
│ └── list.md
│ ├── category
│ └── list.md
│ ├── comment
│ ├── delete.md
│ ├── list.md
│ ├── modify.md
│ ├── recent.md
│ └── write.md
│ └── post
│ ├── attach.md
│ ├── list.md
│ ├── modify.md
│ ├── read.md
│ └── write.md
├── auth
├── README.md
└── authorization_code.md
├── book.json
├── docs
├── .editorconfig
├── GLOSSARY.html
├── apis
│ ├── index.html
│ └── v1
│ │ ├── blog
│ │ └── list.html
│ │ ├── category
│ │ └── list.html
│ │ ├── comment
│ │ ├── delete.html
│ │ ├── list.html
│ │ ├── modify.html
│ │ ├── recent.html
│ │ └── write.html
│ │ └── post
│ │ ├── attach.html
│ │ ├── list.html
│ │ ├── modify.html
│ │ ├── read.html
│ │ └── write.html
├── auth
│ ├── authorization_code.html
│ └── index.html
├── document-tistory-apis.iml
├── gitbook
│ ├── fonts
│ │ └── fontawesome
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.svg
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ └── fontawesome-webfont.woff2
│ ├── gitbook-plugin-fontsettings
│ │ ├── fontsettings.js
│ │ └── website.css
│ ├── gitbook-plugin-highlight
│ │ ├── ebook.css
│ │ └── website.css
│ ├── gitbook-plugin-lunr
│ │ ├── lunr.min.js
│ │ └── search-lunr.js
│ ├── gitbook-plugin-search
│ │ ├── lunr.min.js
│ │ ├── search-engine.js
│ │ ├── search.css
│ │ └── search.js
│ ├── gitbook-plugin-sharing
│ │ └── buttons.js
│ ├── gitbook.js
│ ├── images
│ │ ├── apple-touch-icon-precomposed-152.png
│ │ ├── document-tistory-logo.png
│ │ ├── favicon.ico
│ │ └── tistory-logo.png
│ ├── style.css
│ └── theme.js
├── index.html
└── search_index.json
├── document-tistory-apis.iml
└── package.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | end_of_line = lf
5 | insert_final_newline = true
6 | indent_style = space
7 | indent_size = 2
8 | charset = utf-8
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Node rules:
2 | ## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
3 | .grunt
4 |
5 | ## Dependency directory
6 | ## Commenting this out is preferred by some people, see
7 | ## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git
8 | node_modules
9 | package-lock.json
10 |
11 | # Book build output
12 | _book
13 |
14 | # eBook build output
15 | *.epub
16 | *.mobi
17 | *.pdf
18 |
19 | docs/.*
20 | docs/package*.json
21 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 |
--------------------------------------------------------------------------------
/.idea/jpa-buddy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/GLOSSARY.md:
--------------------------------------------------------------------------------
1 | ## Blog Name
2 | 블로그를 구분하는 식별자로 사용되며 티스토리 주소 `xxx.tistory.com`에서 `xxx`를 나타냅니다.
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 티스토리 Open API 서비스 종료 안내
2 |
3 | - 일정: 2024년 2월까지 순차 종료
4 | - 파일 첨부 > 글 관련 기능 > 댓글 관련 기능 > 그 외 기능 순으로 종료
5 | - 상세 공지 링크 : https://notice.tistory.com/2664
6 |
--------------------------------------------------------------------------------
/SUMMARY.md:
--------------------------------------------------------------------------------
1 | # 개요
2 |
3 | ### 기본
4 | - [소개](README.md)
5 |
6 | ### 인증 가이드
7 | - [OAuth 2.0](auth/README.md)
8 | - [Authorization Code 방식](auth/authorization_code.md)
9 |
10 | ### API 가이드
11 | - [소개](apis/README.md)
12 | - v1
13 | - [블로그 정보](apis/v1/blog/list.md)
14 | - 글
15 | - [글 목록](apis/v1/post/list.md)
16 | - [글 읽기](apis/v1/post/read.md)
17 | - [글 작성](apis/v1/post/write.md)
18 | - [글 수정](apis/v1/post/modify.md)
19 | - [파일 첨부](apis/v1/post/attach.md)
20 | - [카테고리](apis/v1/category/list.md)
21 | - 댓글
22 | - [최근 댓글 목록](apis/v1/comment/recent.md)
23 | - [댓글 목록](apis/v1/comment/list.md)
24 | - [댓글 작성](apis/v1/comment/write.md)
25 | - [댓글 수정](apis/v1/comment/modify.md)
26 | - [댓글 삭제](apis/v1/comment/delete.md)
27 |
28 |
--------------------------------------------------------------------------------
/apis/README.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # Open API 소개
4 |
5 | 티스토리 Open API는 다음과 같은 형태의 URL로 제공됩니다.
6 |
7 | ```
8 | https://www.tistory.com/apis/{RESOURCE}?
9 | access_token={access-token}
10 | &output={output-type}
11 | ```
12 |
13 | 매개변수는 다음과 같습니다.
14 |
15 | - access_token: 발급받은 Access Token 입니다.
16 | - output: xml, json 두가지 형태의 응답형식을 지정하며 생략가능합니다. 생략할 경우 요청해더의 'Content-Type'을 보고 응답형식을 결정하며 기본 값은 xml입니다.
17 |
18 | ## 예
19 |
20 | 카테고리 리스트를 xml로 가져올 때
21 | ```
22 | https://www.tistory.com/apis/category/list?
23 | access_token=abcdefghijklmnopqrstuvwxyz
24 | ```
25 |
26 | 두번째 페이지의 글 리스트를 json으로 가져올 때
27 | ```
28 | https://www.tistory.com/apis/post/list?
29 | access_token=abcdefghijklmnopqrstuvwxyz
30 | &page=2
31 | &output=json
32 | ```
33 |
34 | ## 응답 예
35 |
36 | JSON 응답
37 | ```json
38 | {
39 | "tistory": {
40 | "status": "[결과 CODE]",
41 | "item": "[DATA]",
42 | "error_message": "[오류 발생시에만 사용]"
43 | }
44 | }
45 | ```
46 |
47 | XML 응답
48 | ```xml
49 |
50 | [결과 CODE]
51 | - [DATA]
52 | [오류 발생시에만 사용]
53 |
54 | ```
55 |
--------------------------------------------------------------------------------
/apis/v1/blog/list.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 블로그 정보 API
4 |
5 | 자신의 블로그 정보를 가져오는 API 입니다.
6 |
7 | ```
8 | GET https://www.tistory.com/apis/blog/info?
9 | access_token={access-token}
10 | &output={output-type}
11 | ```
12 |
13 | ## 응답 item
14 |
15 | - id: 사용자 로그인 아이디
16 | - userId: 사용자 id
17 | - blogs
18 | - url: 티스토리 기본 url
19 | - secondaryUrl: 독립도메인 url
20 | - title: 블로그 타이틀
21 | - description: 블로그 설명
22 | - default: 대표블로그 여부 (Y/N)
23 | - blogIconUrl: 블로그 아이콘 URL
24 | - faviconUrl: 파비콘 URL
25 | - profileThumbnailImageUrl: 대표이미지 썸네일 URL
26 | - profileImageUrl: 대표이미지 URL
27 | - blogId: 블로그 아이디
28 | - nickname: 블로그에서의 닉네임
29 | - role: 블로그 권한
30 | - statistics: 블로그 컨텐츠 개수
31 | - post: 글 수
32 | - comment: 댓글 수
33 | - trackback: 트랙백 수
34 | - guestbook: 방명록 수
35 | - invitation: 초대장 수
36 |
37 | ## 응답값 예
38 |
39 | ```json
40 | {
41 | "tistory": {
42 | "status": "200",
43 | "item": {
44 | "id": "blog_oauth_test@daum.net",
45 | "userId": "12345",
46 | "blogs": [
47 | {
48 | "name": "oauth-test",
49 | "url": "http://oauth-test.tistory.com",
50 | "secondaryUrl": "http://",
51 | "nickname": "티스토리 테스트",
52 | "title": "테스트 블로그 1",
53 | "description": "안녕하세요! 티스토리입니다.",
54 | "default": "Y",
55 | "blogIconUrl": "https://blog_icon_url",
56 | "faviconUrl": "https://favicon_url",
57 | "profileThumbnailImageUrl": "https://profile_image",
58 | "profileImageUrl": "https://profile_image",
59 | "role": "소유자",
60 | "blogId": "123",
61 | "statistics": {
62 | "post": "182",
63 | "comment": "146",
64 | "trackback": "0",
65 | "guestbook": "39",
66 | "invitation": "0"
67 | }
68 | },
69 | ...
70 | ]
71 | }
72 | }
73 | }
74 | ```
75 |
--------------------------------------------------------------------------------
/apis/v1/category/list.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 카테고리 목록 API
4 |
5 | 자신의 블로그 정보를 가져오는 API 입니다.
6 |
7 | ```
8 | GET https://www.tistory.com/apis/category/list?
9 | access_token={access-token}
10 | &output={output-type}
11 | &blogName={blog-name}
12 | ```
13 |
14 | 기본 매개변수를 제외한 매개변수는 다음과 같습니다.
15 |
16 | - blogName: Blog Name 입니다.
17 |
18 | ## 응답 item
19 |
20 | - id: 카테고리 ID
21 | - name: 카테고리 이름
22 | - parent: 부모 카테고리 ID
23 | - label: 부모 카테고리를 포함한 전체 이름 ('/'로 구분)
24 | - entries: 카테고리내 글 수
25 |
26 | ## 응답값 예
27 |
28 | ```json
29 | {
30 | "tistory":{
31 | "status":"200",
32 | "item":{
33 | "url":"oauth",
34 | "secondaryUrl":"",
35 | "categories":[
36 | {
37 | "id":"403929",
38 | "name":"OAuth2.0 Athentication",
39 | "parent":"",
40 | "label":"OAuth2.0 Athentication",
41 | "entries":"0"
42 | },
43 | {
44 | "id":"403930",
45 | "name":"Blog API Series",
46 | "parent":"",
47 | "label":"Blog API Series",
48 | "entries":"0"
49 | },
50 | ...
51 | ]
52 | }
53 | }
54 | }
55 | ```
56 |
--------------------------------------------------------------------------------
/apis/v1/comment/delete.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 댓글 수정 API
4 |
5 | 댓글/대댓글을 수정하는 API 입니다.
6 |
7 | ```
8 | POST https://www.tistory.com/apis/comment/delete?
9 | access_token={access-token}
10 | &output={output-type}
11 | &blogName={blog-name}
12 | &postId={post-id}
13 | &commentId={comment-id}
14 | ```
15 |
16 | 기본 매개변수를 제외한 매개변수는 다음과 같습니다.
17 |
18 | - blogName: Blog Name (필수)
19 | - postId: 글 ID (필수)
20 | - commentId: 댓글 ID (필수)
21 |
22 | ## 응답 예
23 | ```json
24 | {
25 | "tistory":{
26 | "status":"200",
27 | }
28 | }
29 | ```
30 |
--------------------------------------------------------------------------------
/apis/v1/comment/list.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 게시글 댓글 목록 API
4 |
5 | 게시글 댓글 목록을 가져오는 API 입니다.
6 |
7 | ```
8 | GET https://www.tistory.com/apis/comment/list?
9 | access_token={access-token}
10 | &output={output-type}
11 | &blogName={blog-name}
12 | &postId={post-id}
13 | ```
14 |
15 | 기본 매개변수를 제외한 매개변수는 다음과 같습니다.
16 |
17 | - blogName: Blog Name 입니다.
18 | - postId: 글 ID
19 |
20 | ## 응답 item
21 |
22 | - id: 댓글 ID
23 | - date: 댓글 작성시간 (TIMESTAMP)
24 | - name: 작성자 이름
25 | - parentId: 부모 댓글 ID (대댓글인 경우만 사용)
26 | - homepage: 작성자 홈페이지 주소
27 | - visibility: 승인 여부 (0: 승인대기, 2: 승인)
28 | - comment: 댓글 내용
29 | - open: 댓글 공개여부 (Y: 공개, N: 비공개)
30 |
31 | ## 응답값 예
32 |
33 | ```json
34 | {
35 | "tistory": {
36 | "status": "200",
37 | "item": {
38 | "url": "http://oauth.tistory.com/4",
39 | "secondaryUrl": "",
40 | "postId": "4",
41 | "totalCount": "3",
42 | "comments": {
43 | "comment": [
44 | {
45 | "id": "8176918",
46 | "date": "1303796711",
47 | "name": "지나다가",
48 | "parentId": "",
49 | "homepage": "http://someurl.com",
50 | "visibility": "2",
51 | "comment": "좋은 글 감사합니다.",
52 | "open": "Y"
53 | },
54 | {
55 | "id": "8176923",
56 | "date": "1303796801",
57 | "name": "글쎄요",
58 | "parentId": "",
59 | "homepage": "http://shesgone.com",
60 | "visibility": "2",
61 | "comment": " 제 홈에 와서 구경해보세요^_^",
62 | "open": "N"
63 | },
64 | {
65 | "id": "8176926",
66 | "date": "1303796900",
67 | "name": "Tistory API",
68 | "parentId": "8176918",
69 | "homepage": "http://oauth.tistory.com",
70 | "visibility": "2",
71 | "comment": "비루한 글에 칭찬을 하시니 몸둘바를 모르.. 지 않아!",
72 | "open": "Y"
73 | }
74 | ]
75 | }
76 | }
77 | }
78 | }
79 | ```
80 |
--------------------------------------------------------------------------------
/apis/v1/comment/modify.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 댓글 수정 API
4 |
5 | 댓글/대댓글을 수정하는 API 입니다.
6 |
7 | ```
8 | POST https://www.tistory.com/apis/comment/modify?
9 | access_token={access-token}
10 | &output={output-type}
11 | &blogName={blog-name}
12 | &postId={post-id}
13 | &parentId={parent-id}
14 | &commentId={comment-id}
15 | &content={content}
16 | &secret={secret}
17 | ```
18 |
19 | 기본 매개변수를 제외한 매개변수는 다음과 같습니다.
20 |
21 | - blogName: Blog Name (필수)
22 | - postId: 글 ID (필수)
23 | - commentId: 댓글 ID (필수)
24 | - parentId: 부모 댓글 ID (대댓글인 경우 사용)
25 | - content: 댓글 내용
26 | - secret: 비밀 댓글 여부 (1: 비밀댓글, 0: 공개댓글 - 기본 값)
27 |
28 | ## 응답
29 |
30 | - commentUrl: 댓글 바로가기 링크
31 |
32 | ## 응답 예
33 | ```json
34 | {
35 | "tistory":{
36 | "status":"200",
37 | "result":"OK",
38 | "commentUrl":"http://oauth.tistory.com/4#comment8176976"
39 | }
40 | }
41 | ```
42 |
--------------------------------------------------------------------------------
/apis/v1/comment/recent.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 최근 댓글 목록 API
4 |
5 | 최근 댓글 목록을 가져오는 API 입니다.
6 |
7 | ```
8 | GET https://www.tistory.com/apis/comment/newest?
9 | access_token={access-token}
10 | &output={output-type}
11 | &blogName={blog-name}
12 | &page={page}
13 | &count={count}
14 | ```
15 |
16 | 기본 매개변수를 제외한 매개변수는 다음과 같습니다.
17 |
18 | - blogName: Blog Name 입니다.
19 | - page: 가져올 페이지 (기본값: 1)
20 | - count: 페이지당 댓글 수 (기본값: 10, 최대값: 10)
21 |
22 | ## 응답 item
23 |
24 | - id: 댓글 ID
25 | - date: 댓글 작성시간 (TIMESTAMP)
26 | - postId: 작성된 글 ID
27 | - name: 작성자 이름
28 | - homepage: 작성자 홈페이지 주소
29 | - comment: 댓글 내용
30 | - open: 댓글 공개여부 (Y: 공개, N: 비공개)
31 |
32 | ## 응답값 예
33 |
34 | ```json
35 | {
36 | "tistory":{
37 | "status":"200",
38 | "item":{
39 | "url":"http://oauth.tistory.com",
40 | "secondaryUrl":"",
41 | "comments":{
42 | "comment":[
43 | {
44 | "id":"8176926",
45 | "date":"1303796900",
46 | "postId":"4",
47 | "name":"Tistory API",
48 | "homepage":"http://oauth.tistory.com",
49 | "comment":"비루한 글에 칭찬을 하시니 몸둘바를 모르.. 지 않아!",
50 | "open":"Y"
51 | },
52 | {
53 | "id":"8176923",
54 | "date":"1303796801",
55 | "postId":"4",
56 | "name":"글쎄 요",
57 | "homepage":"http://shesgone.com",
58 | "comment":"제 홈에 와서 구경해보세요^_^",
59 | "open":"N"
60 | },
61 | {
62 | "id":"8176918",
63 | "date":"1303796711",
64 | "postId":"4",
65 | "name":"지나다가",
66 | "homepage":"http://someurl.com",
67 | "comment":"좋은 글 감사합니다.",
68 | "open":"Y"
69 | }
70 | ]
71 | }
72 | }
73 | }
74 | }
75 | ```
76 |
--------------------------------------------------------------------------------
/apis/v1/comment/write.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 댓글 작성 API
4 |
5 | 게시글에 댓글/대댓글을 작성하는 API 입니다.
6 |
7 | ```
8 | POST https://www.tistory.com/apis/comment/write?
9 | access_token={access-token}
10 | &output={output-type}
11 | &blogName={blog-name}
12 | &postId={post-id}
13 | &parentId={parent-id}
14 | &content={content}
15 | &secret={secret}
16 | ```
17 |
18 | 기본 매개변수를 제외한 매개변수는 다음과 같습니다.
19 |
20 | - blogName: Blog Name (필수)
21 | - postId: 글 ID (필수)
22 | - parentId: 부모 댓글 ID (대댓글인 경우 사용)
23 | - content: 댓글 내용
24 | - secret: 비밀 댓글 여부 (1: 비밀댓글, 0: 공개댓글 - 기본 값)
25 |
26 | ## 응답
27 |
28 | - commentUrl: 댓글 바로가기 링크
29 |
30 | ## 응답 예
31 | ```json
32 | {
33 | "tistory":{
34 | "status":"200",
35 | "result":"OK",
36 | "commentUrl":"http://oauth.tistory.com/4#comment8176976"
37 | }
38 | }
39 | ```
40 |
--------------------------------------------------------------------------------
/apis/v1/post/attach.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 파일 첨부 API
4 |
5 | ```
6 | POST https://www.tistory.com/apis/post/attach?
7 | access_token={access-token}
8 | &blogName={blog-name}
9 |
10 | [uploadedfile]
11 | ```
12 |
13 | 기본 매개변수를 제외한 매개변수는 다음과 같습니다.
14 |
15 | - blogName: Blog Name 입니다.
16 | - uploadedfile: 업로드할 파일 (multipart/form-data)
17 |
18 | ## 응답
19 |
20 | - url: 업로드한 파일의 url
21 | - replacer: 업로드한 파일의 치환자
22 |
23 | ## 응답 예
24 |
25 | ```
26 | {
27 | "tistory":{
28 | "status":"200",
29 | "url":"http://cfile6.uf.tistory.com/image/1328CE504DB79F5932B13F",
30 | "replacer":"%5b%23%23_1N%7ccfile6.uf%401328CE504DB79F5932B13F%7cwidth%3d\"500\"+height%3d\"300\"%7c_%23%23%5d"
31 | }
32 | }
33 | ```
34 |
--------------------------------------------------------------------------------
/apis/v1/post/list.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 글 목록 API
4 |
5 | 블로그 글 목록를 가져오는 API 입니다.
6 |
7 | ```
8 | GET https://www.tistory.com/apis/post/list?
9 | access_token={access-token}
10 | &output={output-type}
11 | &blogName={blog-name}
12 | &page={page-number}
13 | ```
14 |
15 | 기본 매개변수를 제외한 매개변수는 다음과 같습니다.
16 |
17 | - blogName: Blog Name 입니다.
18 | - page: 불러올 페이지 번호입니다.
19 |
20 | ## 응답 item
21 |
22 | - url: 티스토리 기본 url
23 | - secondaryUrl: 독립도메인 url
24 | - page: 현재 페이지
25 | - count: 페이지의 글 개수
26 | - totalCount: 전체 글 수
27 | - posts: 글 리스트
28 | - id: 글 ID
29 | - title: 글 제목
30 | - postUrl: 글 대표 주소
31 | - visibility: 글 공개 단계 (0: 비공개, 15: 보호, 20: 발행)
32 | - categoryId: 카테고리 ID
33 | - comments: 댓글 수
34 | - trackbacks: 트랙백 수
35 | - date: YYYY-mm-dd HH:MM:SS
36 |
37 | ## 응답값 예
38 |
39 | ```json
40 | {
41 | "tistory": {
42 | "status": "200",
43 | "item": {
44 | "url": "http://oauth-test.tistory.com",
45 | "secondaryUrl": "",
46 | "page": "1",
47 | "count": "10",
48 | "totalCount": "181",
49 | "posts": [
50 | {
51 | "id": "201",
52 | "title": "테스트 입니다.",
53 | "postUrl": "http://oauth-test.tistory.com/201",
54 | "visibility": "0",
55 | "categoryId": "0",
56 | "comments": "0",
57 | "trackbacks": "0",
58 | "date": "2018-06-01 17:54:28"
59 | },
60 | ...
61 | ]
62 | }
63 | }
64 | }
65 | ```
66 |
--------------------------------------------------------------------------------
/apis/v1/post/modify.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 글 수정 API
4 |
5 | 블로그에 글을 작성하는 API 입니다.
6 |
7 | ```
8 | POST https://www.tistory.com/apis/post/modify?
9 | access_token={access-token}
10 | &output={output-type}
11 | &blogName={blog-name}
12 | &postId={post-id}
13 | &title={title}
14 | &content={content}
15 | &visibility={visibility}
16 | &category={category-id}
17 | &published={published}
18 | &slogan={slogan}
19 | &tag={tag}
20 | &acceptComment={acceptComment}
21 | &password={password}
22 | ```
23 |
24 | 기본 매개변수를 제외한 매개변수는 다음과 같습니다.
25 |
26 | - blogName: Blog Name (필수)
27 | - postId: 글 번호 (필수)
28 | - title: 글 제목 (필수)
29 | - content: 글 내용
30 | - visibility: 발행상태 (0: 비공개 - 기본값, 1: 보호, 3: 발행)
31 | - category: 카테고리 아이디 (기본값: 0)
32 | - published: 발행시간 (TIMESTAMP 이며 미래의 시간을 넣을 경우 예약. 기본값: 현재시간)
33 | - slogan: 문자 주소
34 | - tag: 태그 (',' 로 구분)
35 | - acceptComment: 댓글 허용 (0, 1 - 기본값)
36 | - password: 보호글 비밀번호
37 |
38 | ## 응답
39 |
40 | - postId: 글 번호
41 | - url: 발행 주소
42 |
43 | ## 응답 예
44 | ```json
45 | {
46 | "tistory":{
47 | "status":"200",
48 | "postId":"74",
49 | "url":"http://sampleUrl.tistory.com/74"
50 | }
51 | }
52 | ```
53 |
--------------------------------------------------------------------------------
/apis/v1/post/read.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 글 읽기 API
4 |
5 | ```
6 | GET https://www.tistory.com/apis/post/read?
7 | access_token={access-token}
8 | &blogName={blog-name}
9 | &postId={post-id}
10 | ```
11 |
12 | 기본 매개변수를 제외한 매개변수는 다음과 같습니다.
13 |
14 | - blogName: Blog Name 입니다.
15 | - postId: 글 ID
16 |
17 | ## 응답 item
18 |
19 | - url
20 | - secondaryUrl
21 | - id: 글 ID
22 | - title: 글 제목
23 | - content: 내용
24 | - categoryId: 카테고리 ID
25 | - postUrl: 글 대표주소
26 | - visibility: 글 공개 단계
27 | - acceptComment: 댓글 허용 여부(허용: 1, 비허용: 0)
28 | - tags
29 | - tag: 태그
30 | - comments: 댓글 개수
31 | - date: 발행시간 timestamp
32 |
33 | ## 응답 예
34 |
35 | ```
36 | {
37 | "tistory":{
38 | "status":"200",
39 | "item":{
40 | "url":"http://oauth.tistory.com",
41 | "secondaryUrl":"",
42 | "id":"1",
43 | "title":"티스토리 OAuth2.0 API 오픈!",
44 | "content":"안녕하세요 Tistory API 입니다.
이번에 Third-party Developer 용 Tistory OAuth 2.0 API 가 오픈됩니다.
Tistory 회원이라면, 여러분의 모든 app에 자유롭게 활용하실 수 있습니다.

많은 기대와 사랑 부탁드립니다.
",
45 | "categoryId":"0",
46 | "postUrl":"http://oauth.tistory.com/1",
47 | "visibility":"0",
48 | "acceptComment":"1",
49 | "acceptTrackback":"1",
50 | "tags":{
51 | "tag":["open", "api"]
52 | },
53 | "comments":"0",
54 | "trackbacks":"0",
55 | "date":"1303352668"
56 | }
57 | }
58 | }
59 | ```
60 |
--------------------------------------------------------------------------------
/apis/v1/post/write.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # 글 작성 API
4 |
5 | 블로그에 글을 작성하는 API 입니다.
6 |
7 | ```
8 | POST https://www.tistory.com/apis/post/write?
9 | access_token={access-token}
10 | &output={output-type}
11 | &blogName={blog-name}
12 | &title={title}
13 | &content={content}
14 | &visibility={visibility}
15 | &category={category-id}
16 | &published={published}
17 | &slogan={slogan}
18 | &tag={tag}
19 | &acceptComment={acceptComment}
20 | &password={password}
21 | ```
22 |
23 | 기본 매개변수를 제외한 매개변수는 다음과 같습니다.
24 |
25 | - blogName: Blog Name (필수)
26 | - title: 글 제목 (필수)
27 | - content: 글 내용
28 | - visibility: 발행상태 (0: 비공개 - 기본값, 1: 보호, 3: 발행)
29 | - category: 카테고리 아이디 (기본값: 0)
30 | - published: 발행시간 (TIMESTAMP 이며 미래의 시간을 넣을 경우 예약. 기본값: 현재시간)
31 | - slogan: 문자 주소
32 | - tag: 태그 (',' 로 구분)
33 | - acceptComment: 댓글 허용 (0, 1 - 기본값)
34 | - password: 보호글 비밀번호
35 |
36 | ## 응답
37 |
38 | - postId: 글 번호
39 | - url: 발행 주소
40 |
41 | ## 응답 예
42 | ```json
43 | {
44 | "tistory":{
45 | "status":"200",
46 | "postId":"74",
47 | "url":"http://sampleUrl.tistory.com/74"
48 | }
49 | }
50 | ```
51 |
--------------------------------------------------------------------------------
/auth/README.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # OAuth 2.0
4 |
5 | [OAuth 2.0](https://oauth.net/2/)은 외부에 인증 및 서비스 사용권한을 제공하는 위한 산업표준 프로토콜입니다. 거의 대부분의 서비스에서 제공하는만큼 설명도 충분히 많은지라 자세한 내용은 [OAuth 2.0을 검색](https://search.daum.net/search?w=blog&f=section&SA=tistory&lpp=10&nil_profile=vsearch&nil_src=tistory&q=oauth+2.0)해보시기 바랍니다.
6 |
7 |
--------------------------------------------------------------------------------
/auth/authorization_code.md:
--------------------------------------------------------------------------------
1 | `공지` 아래 API는 종료되었습니다. [link](https://notice.tistory.com/2664)
2 |
3 | # Authentication Code 방식
4 |
5 | Server-side 프로그래밍으로 인증을 구현할 경우 사용하기 적합한 인증 방식입니다.
6 |
7 | ## 인증 요청 및 Authentication code 발급
8 |
9 | 사용자의 티스토리의 데이터 접근을 위해서 사용자에게 티스토리 인증요청을 합니다. 아래의 URL로 사용자가 접근하도록 하면 인증절차가 진행되며 사용자가 티스토리에 로그인하지 않은 경우 로그인 후에 인증 절차가 진행됩니다.
10 |
11 | ```
12 | https://www.tistory.com/oauth/authorize?
13 | client_id={client-id}
14 | &redirect_uri={redirect-uri}
15 | &response_type=code
16 | &state={state-param}
17 | ```
18 |
19 | 매개변수는 다음과 같습니다.
20 |
21 | - client_id: 클라이언트 정보의 Client ID 입니다.
22 | - redirect_uri: 사용자가 인증 후에 리디렉션할 URI입니다. 클라이언트 정보의 Callback 경로로 등록하여야 하며 등록되지 않은 URI를 사용하는 경우 인증이 거부됩니다.
23 | - response_type: 항상 `code`를 사용합니다.
24 | - state: [사이트간 요청 위조](https://en.wikipedia.org/wiki/Cross-site_request_forgery) 공격을 보호하기 위한 임의의 고유한 문자열이며 리디렉션시 해당 값이 전달됩니다. (필수아님)
25 |
26 | ### 예
27 |
28 | 인증요청 URI가 다음과 같은 경우
29 |
30 | ```
31 | https://www.tistory.com/oauth/authorize?
32 | client_id=abcdefghijklmnopqrstuvwxyz
33 | &redirect_uri=http://client.redirect.uri
34 | &response_type=code
35 | &state=someValue
36 | ```
37 |
38 | 인증 완료후 다음과 같이 리디렉션됩니다.
39 |
40 | ```
41 | http://client.redirect.uri?code=authorizationCode&state=someValue
42 | ```
43 |
44 | ## 리디렉션 처리
45 |
46 | 사용자가 인증을 완료하면 code와 함께 다음의 URI로 리디렉션됩니다.
47 |
48 | ```
49 | {redirect-uri}?
50 | code={authorization-code}
51 | &state={state-param}
52 | ```
53 |
54 | 매개변수는 다음과 같습니다.
55 |
56 | - code: 티스토리가 발급하는 Authorization code로 Access Token을 발급받는데 사용합니다. 발급된 code는 1시간 이내에만 사용가능하며 재사용 할 수 없습니다.
57 | - state: 인증요청시 전달한 값입니다. 이 값을 통해 요청이 변조되었는지 검사합니다.
58 |
59 |
60 | ### 오류
61 |
62 | 오류가 발생한 경우 오류정보와 함께 redirect_uri로 리디렉션됩니다.
63 |
64 | ```
65 | {redirect-uri}?
66 | error={error}
67 | &error_reason={error-reason}
68 | &state={state-param}
69 | ```
70 |
71 | 매개변수는 다음과 같습니다.
72 |
73 | - error: 에러 코드입니다. 자세한 내용은 [OAuth 2.0 명세](https://tools.ietf.org/html/rfc6749#section-4.1.2.1)에 정의되어 있습니다.
74 | - error_reason: 에러에 대한 설명입니다.
75 | - state: 인증요청시 전달한 값입니다. 이 값을 통해 요청이 변조되었는지 검사합니다.
76 |
77 | ## Access Token 발급
78 |
79 | 다음의 URL을 사용해 발급된 code를 Access Token과 교환합니다. 이때 Secret Key가 사용되므로 반드시 서버에서 수행해야합니다.
80 |
81 | ```
82 | GET https://www.tistory.com/oauth/access_token?
83 | client_id={client-id}
84 | &client_secret={client-secret}
85 | &redirect_uri={redirect-uri}
86 | &code={code}
87 | &grant_type=authorization_code
88 | ```
89 |
90 | 매개변수는 다음과 같습니다.
91 |
92 | - client_id: 클라이언트 정보의 Client ID 입니다.
93 | - client_secret: 클라이언트 정보의 Secret Key 입니다. 이 정보는 티스토리와 Client만이 공유해야하며 절대 외부에 공개되면 안됩니다.
94 | - redirect_uri: 인증요청시 사용한 리디렉션 URL로 요청검증을 위해 사용합니다.
95 | - code: 리디렉션으로 전달받은 code를 그대로 사용합니다.
96 | - grant_type: 항상 `authorization_code`를 사용합니다.
97 |
98 | 발급요청이 성공한 경우 HTTP 200 응답과 함께 Access Token이 응답값으로 옵니다.
99 |
100 | ```
101 | {access-token}
102 | ```
103 |
104 | ### 오류
105 |
106 | 오류가 발생한 경우 HTTP 오류 응답과 함께 오류 메시지가 응답값으로 옵니다. 응답값은 다음과 같습니다.
107 |
108 | ```
109 | error={error}&error_description={error-description}
110 | ```
111 |
112 | - error: 에러코드입니다.
113 | - error_description: 에러에 대한 설명입니다.
114 |
--------------------------------------------------------------------------------
/book.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": ".",
3 | "pdf": {
4 | "fontSize": 10
5 | },
6 | "plugins": [
7 | "theme-tistory"
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/docs/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | end_of_line = lf
5 | insert_final_newline = true
6 | indent_style = space
7 | indent_size = 2
8 | charset = utf-8
9 |
--------------------------------------------------------------------------------
/docs/GLOSSARY.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | · GitBook
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 | Blog Name
418 | 블로그를 구분하는 식별자로 사용되며 티스토리 주소 xxx.tistory.com
에서 xxx
를 나타냅니다.
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
results matching ""
428 |
429 |
430 |
431 |
432 |
433 |
No results matching ""
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
--------------------------------------------------------------------------------
/docs/apis/v1/comment/delete.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 댓글 삭제 · GitBook
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 | 공지
아래 API는 종료되었습니다. link
420 | 댓글 수정 API
421 | 댓글/대댓글을 수정하는 API 입니다.
422 | POST https://www.tistory.com/apis/comment/delete?
423 | access_token={access-token}
424 | &output={output-type}
425 | &blogName={blog-name}
426 | &postId={post-id}
427 | &commentId={comment-id}
428 |
기본 매개변수를 제외한 매개변수는 다음과 같습니다.
429 |
430 | - blogName: Blog Name (필수)
431 | - postId: 글 ID (필수)
432 | - commentId: 댓글 ID (필수)
433 |
434 | 응답 예
435 | {
436 | "tistory":{
437 | "status":"200",
438 | }
439 | }
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
results matching ""
450 |
451 |
452 |
453 |
454 |
455 |
No results matching ""
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
--------------------------------------------------------------------------------
/docs/apis/v1/comment/modify.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 댓글 수정 · GitBook
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 | 공지
아래 API는 종료되었습니다. link
422 | 댓글 수정 API
423 | 댓글/대댓글을 수정하는 API 입니다.
424 | POST https://www.tistory.com/apis/comment/modify?
425 | access_token={access-token}
426 | &output={output-type}
427 | &blogName={blog-name}
428 | &postId={post-id}
429 | &parentId={parent-id}
430 | &commentId={comment-id}
431 | &content={content}
432 | &secret={secret}
433 |
기본 매개변수를 제외한 매개변수는 다음과 같습니다.
434 |
435 | - blogName: Blog Name (필수)
436 | - postId: 글 ID (필수)
437 | - commentId: 댓글 ID (필수)
438 | - parentId: 부모 댓글 ID (대댓글인 경우 사용)
439 | - content: 댓글 내용
440 | - secret: 비밀 댓글 여부 (1: 비밀댓글, 0: 공개댓글 - 기본 값)
441 |
442 | 응답
443 |
444 | - commentUrl: 댓글 바로가기 링크
445 |
446 | 응답 예
447 | {
448 | "tistory":{
449 | "status":"200",
450 | "result":"OK",
451 | "commentUrl":"http://oauth.tistory.com/4#comment8176976"
452 | }
453 | }
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
results matching ""
464 |
465 |
466 |
467 |
468 |
469 |
No results matching ""
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
--------------------------------------------------------------------------------
/docs/apis/v1/comment/write.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 댓글 작성 · GitBook
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 | 공지
아래 API는 종료되었습니다. link
422 | 댓글 작성 API
423 | 게시글에 댓글/대댓글을 작성하는 API 입니다.
424 | POST https://www.tistory.com/apis/comment/write?
425 | access_token={access-token}
426 | &output={output-type}
427 | &blogName={blog-name}
428 | &postId={post-id}
429 | &parentId={parent-id}
430 | &content={content}
431 | &secret={secret}
432 |
기본 매개변수를 제외한 매개변수는 다음과 같습니다.
433 |
434 | - blogName: Blog Name (필수)
435 | - postId: 글 ID (필수)
436 | - parentId: 부모 댓글 ID (대댓글인 경우 사용)
437 | - content: 댓글 내용
438 | - secret: 비밀 댓글 여부 (1: 비밀댓글, 0: 공개댓글 - 기본 값)
439 |
440 | 응답
441 |
442 | - commentUrl: 댓글 바로가기 링크
443 |
444 | 응답 예
445 | {
446 | "tistory":{
447 | "status":"200",
448 | "result":"OK",
449 | "commentUrl":"http://oauth.tistory.com/4#comment8176976"
450 | }
451 | }
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
results matching ""
462 |
463 |
464 |
465 |
466 |
467 |
No results matching ""
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
--------------------------------------------------------------------------------
/docs/apis/v1/post/attach.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 파일 첨부 · GitBook
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 | 공지
아래 API는 종료되었습니다. link
422 | 파일 첨부 API
423 | POST https://www.tistory.com/apis/post/attach?
424 | access_token={access-token}
425 | &blogName={blog-name}
426 |
427 | [uploadedfile]
428 |
기본 매개변수를 제외한 매개변수는 다음과 같습니다.
429 |
430 | - blogName: Blog Name 입니다.
431 | - uploadedfile: 업로드할 파일 (multipart/form-data)
432 |
433 | 응답
434 |
435 | - url: 업로드한 파일의 url
436 | - replacer: 업로드한 파일의 치환자
437 |
438 | 응답 예
439 | {
440 | "tistory":{
441 | "status":"200",
442 | "url":"http://cfile6.uf.tistory.com/image/1328CE504DB79F5932B13F",
443 | "replacer":"%5b%23%23_1N%7ccfile6.uf%401328CE504DB79F5932B13F%7cwidth%3d\"500\"+height%3d\"300\"%7c_%23%23%5d"
444 | }
445 | }
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
results matching ""
455 |
456 |
457 |
458 |
459 |
460 |
No results matching ""
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
--------------------------------------------------------------------------------
/docs/apis/v1/post/write.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 글 작성 · GitBook
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 | 공지
아래 API는 종료되었습니다. link
422 | 글 작성 API
423 | 블로그에 글을 작성하는 API 입니다.
424 | POST https://www.tistory.com/apis/post/write?
425 | access_token={access-token}
426 | &output={output-type}
427 | &blogName={blog-name}
428 | &title={title}
429 | &content={content}
430 | &visibility={visibility}
431 | &category={category-id}
432 | &published={published}
433 | &slogan={slogan}
434 | &tag={tag}
435 | &acceptComment={acceptComment}
436 | &password={password}
437 |
기본 매개변수를 제외한 매개변수는 다음과 같습니다.
438 |
439 | - blogName: Blog Name (필수)
440 | - title: 글 제목 (필수)
441 | - content: 글 내용
442 | - visibility: 발행상태 (0: 비공개 - 기본값, 1: 보호, 3: 발행)
443 | - category: 카테고리 아이디 (기본값: 0)
444 | - published: 발행시간 (TIMESTAMP 이며 미래의 시간을 넣을 경우 예약. 기본값: 현재시간)
445 | - slogan: 문자 주소
446 | - tag: 태그 (',' 로 구분)
447 | - acceptComment: 댓글 허용 (0, 1 - 기본값)
448 | - password: 보호글 비밀번호
449 |
450 | 응답
451 |
452 | - postId: 글 번호
453 | - url: 발행 주소
454 |
455 | 응답 예
456 | {
457 | "tistory":{
458 | "status":"200",
459 | "postId":"74",
460 | "url":"http://sampleUrl.tistory.com/74"
461 | }
462 | }
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
results matching ""
473 |
474 |
475 |
476 |
477 |
478 |
No results matching ""
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
--------------------------------------------------------------------------------
/docs/auth/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | OAuth 2.0 · GitBook
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 | 공지
아래 API는 종료되었습니다. link
422 | OAuth 2.0
423 | OAuth 2.0은 외부에 인증 및 서비스 사용권한을 제공하는 위한 산업표준 프로토콜입니다. 거의 대부분의 서비스에서 제공하는만큼 설명도 충분히 많은지라 자세한 내용은 OAuth 2.0을 검색해보시기 바랍니다.
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
results matching ""
433 |
434 |
435 |
436 |
437 |
438 |
No results matching ""
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
--------------------------------------------------------------------------------
/docs/document-tistory-apis.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/docs/gitbook/fonts/fontawesome/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tistory/document-tistory-apis/b549962e5a38880ed761b02333ffd9aea3a437cc/docs/gitbook/fonts/fontawesome/FontAwesome.otf
--------------------------------------------------------------------------------
/docs/gitbook/fonts/fontawesome/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tistory/document-tistory-apis/b549962e5a38880ed761b02333ffd9aea3a437cc/docs/gitbook/fonts/fontawesome/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/docs/gitbook/fonts/fontawesome/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tistory/document-tistory-apis/b549962e5a38880ed761b02333ffd9aea3a437cc/docs/gitbook/fonts/fontawesome/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tistory/document-tistory-apis/b549962e5a38880ed761b02333ffd9aea3a437cc/docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tistory/document-tistory-apis/b549962e5a38880ed761b02333ffd9aea3a437cc/docs/gitbook/fonts/fontawesome/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/docs/gitbook/gitbook-plugin-fontsettings/fontsettings.js:
--------------------------------------------------------------------------------
1 | require(['gitbook', 'jquery'], function(gitbook, $) {
2 | // Configuration
3 | var MAX_SIZE = 4,
4 | MIN_SIZE = 0,
5 | BUTTON_ID;
6 |
7 | // Current fontsettings state
8 | var fontState;
9 |
10 | // Default themes
11 | var THEMES = [
12 | {
13 | config: 'white',
14 | text: 'White',
15 | id: 0
16 | },
17 | {
18 | config: 'sepia',
19 | text: 'Sepia',
20 | id: 1
21 | },
22 | {
23 | config: 'night',
24 | text: 'Night',
25 | id: 2
26 | }
27 | ];
28 |
29 | // Default font families
30 | var FAMILIES = [
31 | {
32 | config: 'serif',
33 | text: 'Serif',
34 | id: 0
35 | },
36 | {
37 | config: 'sans',
38 | text: 'Sans',
39 | id: 1
40 | }
41 | ];
42 |
43 | // Return configured themes
44 | function getThemes() {
45 | return THEMES;
46 | }
47 |
48 | // Modify configured themes
49 | function setThemes(themes) {
50 | THEMES = themes;
51 | updateButtons();
52 | }
53 |
54 | // Return configured font families
55 | function getFamilies() {
56 | return FAMILIES;
57 | }
58 |
59 | // Modify configured font families
60 | function setFamilies(families) {
61 | FAMILIES = families;
62 | updateButtons();
63 | }
64 |
65 | // Save current font settings
66 | function saveFontSettings() {
67 | gitbook.storage.set('fontState', fontState);
68 | update();
69 | }
70 |
71 | // Increase font size
72 | function enlargeFontSize(e) {
73 | e.preventDefault();
74 | if (fontState.size >= MAX_SIZE) return;
75 |
76 | fontState.size++;
77 | saveFontSettings();
78 | }
79 |
80 | // Decrease font size
81 | function reduceFontSize(e) {
82 | e.preventDefault();
83 | if (fontState.size <= MIN_SIZE) return;
84 |
85 | fontState.size--;
86 | saveFontSettings();
87 | }
88 |
89 | // Change font family
90 | function changeFontFamily(configName, e) {
91 | if (e && e instanceof Event) {
92 | e.preventDefault();
93 | }
94 |
95 | var familyId = getFontFamilyId(configName);
96 | fontState.family = familyId;
97 | saveFontSettings();
98 | }
99 |
100 | // Change type of color theme
101 | function changeColorTheme(configName, e) {
102 | if (e && e instanceof Event) {
103 | e.preventDefault();
104 | }
105 |
106 | var $book = gitbook.state.$book;
107 |
108 | // Remove currently applied color theme
109 | if (fontState.theme !== 0)
110 | $book.removeClass('color-theme-'+fontState.theme);
111 |
112 | // Set new color theme
113 | var themeId = getThemeId(configName);
114 | fontState.theme = themeId;
115 | if (fontState.theme !== 0)
116 | $book.addClass('color-theme-'+fontState.theme);
117 |
118 | saveFontSettings();
119 | }
120 |
121 | // Return the correct id for a font-family config key
122 | // Default to first font-family
123 | function getFontFamilyId(configName) {
124 | // Search for plugin configured font family
125 | var configFamily = $.grep(FAMILIES, function(family) {
126 | return family.config == configName;
127 | })[0];
128 | // Fallback to default font family
129 | return (!!configFamily)? configFamily.id : 0;
130 | }
131 |
132 | // Return the correct id for a theme config key
133 | // Default to first theme
134 | function getThemeId(configName) {
135 | // Search for plugin configured theme
136 | var configTheme = $.grep(THEMES, function(theme) {
137 | return theme.config == configName;
138 | })[0];
139 | // Fallback to default theme
140 | return (!!configTheme)? configTheme.id : 0;
141 | }
142 |
143 | function update() {
144 | var $book = gitbook.state.$book;
145 |
146 | $('.font-settings .font-family-list li').removeClass('active');
147 | $('.font-settings .font-family-list li:nth-child('+(fontState.family+1)+')').addClass('active');
148 |
149 | $book[0].className = $book[0].className.replace(/\bfont-\S+/g, '');
150 | $book.addClass('font-size-'+fontState.size);
151 | $book.addClass('font-family-'+fontState.family);
152 |
153 | if(fontState.theme !== 0) {
154 | $book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, '');
155 | $book.addClass('color-theme-'+fontState.theme);
156 | }
157 | }
158 |
159 | function init(config) {
160 | // Search for plugin configured font family
161 | var configFamily = getFontFamilyId(config.family),
162 | configTheme = getThemeId(config.theme);
163 |
164 | // Instantiate font state object
165 | fontState = gitbook.storage.get('fontState', {
166 | size: config.size || 2,
167 | family: configFamily,
168 | theme: configTheme
169 | });
170 |
171 | update();
172 | }
173 |
174 | function updateButtons() {
175 | // Remove existing fontsettings buttons
176 | if (!!BUTTON_ID) {
177 | gitbook.toolbar.removeButton(BUTTON_ID);
178 | }
179 |
180 | // Create buttons in toolbar
181 | BUTTON_ID = gitbook.toolbar.createButton({
182 | icon: 'fa fa-font',
183 | label: 'Font Settings',
184 | className: 'font-settings',
185 | dropdown: [
186 | [
187 | {
188 | text: 'A',
189 | className: 'font-reduce',
190 | onClick: reduceFontSize
191 | },
192 | {
193 | text: 'A',
194 | className: 'font-enlarge',
195 | onClick: enlargeFontSize
196 | }
197 | ],
198 | $.map(FAMILIES, function(family) {
199 | family.onClick = function(e) {
200 | return changeFontFamily(family.config, e);
201 | };
202 |
203 | return family;
204 | }),
205 | $.map(THEMES, function(theme) {
206 | theme.onClick = function(e) {
207 | return changeColorTheme(theme.config, e);
208 | };
209 |
210 | return theme;
211 | })
212 | ]
213 | });
214 | }
215 |
216 | // Init configuration at start
217 | gitbook.events.bind('start', function(e, config) {
218 | var opts = config.fontsettings;
219 |
220 | // Generate buttons at start
221 | updateButtons();
222 |
223 | // Init current settings
224 | init(opts);
225 | });
226 |
227 | // Expose API
228 | gitbook.fontsettings = {
229 | enlargeFontSize: enlargeFontSize,
230 | reduceFontSize: reduceFontSize,
231 | setTheme: changeColorTheme,
232 | setFamily: changeFontFamily,
233 | getThemes: getThemes,
234 | setThemes: setThemes,
235 | getFamilies: getFamilies,
236 | setFamilies: setFamilies
237 | };
238 | });
239 |
240 |
241 |
--------------------------------------------------------------------------------
/docs/gitbook/gitbook-plugin-fontsettings/website.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Theme 1
3 | */
4 | .color-theme-1 .dropdown-menu {
5 | background-color: #111111;
6 | border-color: #7e888b;
7 | }
8 | .color-theme-1 .dropdown-menu .dropdown-caret .caret-inner {
9 | border-bottom: 9px solid #111111;
10 | }
11 | .color-theme-1 .dropdown-menu .buttons {
12 | border-color: #7e888b;
13 | }
14 | .color-theme-1 .dropdown-menu .button {
15 | color: #afa790;
16 | }
17 | .color-theme-1 .dropdown-menu .button:hover {
18 | color: #73553c;
19 | }
20 | /*
21 | * Theme 2
22 | */
23 | .color-theme-2 .dropdown-menu {
24 | background-color: #2d3143;
25 | border-color: #272a3a;
26 | }
27 | .color-theme-2 .dropdown-menu .dropdown-caret .caret-inner {
28 | border-bottom: 9px solid #2d3143;
29 | }
30 | .color-theme-2 .dropdown-menu .buttons {
31 | border-color: #272a3a;
32 | }
33 | .color-theme-2 .dropdown-menu .button {
34 | color: #62677f;
35 | }
36 | .color-theme-2 .dropdown-menu .button:hover {
37 | color: #f4f4f5;
38 | }
39 | .book .book-header .font-settings .font-enlarge {
40 | line-height: 30px;
41 | font-size: 1.4em;
42 | }
43 | .book .book-header .font-settings .font-reduce {
44 | line-height: 30px;
45 | font-size: 1em;
46 | }
47 | .book.color-theme-1 .book-body {
48 | color: #704214;
49 | background: #f3eacb;
50 | }
51 | .book.color-theme-1 .book-body .page-wrapper .page-inner section {
52 | background: #f3eacb;
53 | }
54 | .book.color-theme-2 .book-body {
55 | color: #bdcadb;
56 | background: #1c1f2b;
57 | }
58 | .book.color-theme-2 .book-body .page-wrapper .page-inner section {
59 | background: #1c1f2b;
60 | }
61 | .book.font-size-0 .book-body .page-inner section {
62 | font-size: 1.2rem;
63 | }
64 | .book.font-size-1 .book-body .page-inner section {
65 | font-size: 1.4rem;
66 | }
67 | .book.font-size-2 .book-body .page-inner section {
68 | font-size: 1.6rem;
69 | }
70 | .book.font-size-3 .book-body .page-inner section {
71 | font-size: 2.2rem;
72 | }
73 | .book.font-size-4 .book-body .page-inner section {
74 | font-size: 4rem;
75 | }
76 | .book.font-family-0 {
77 | font-family: Georgia, serif;
78 | }
79 | .book.font-family-1 {
80 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
81 | }
82 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal {
83 | color: #704214;
84 | }
85 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal a {
86 | color: inherit;
87 | }
88 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1,
89 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2,
90 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h3,
91 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h4,
92 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h5,
93 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 {
94 | color: inherit;
95 | }
96 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1,
97 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2 {
98 | border-color: inherit;
99 | }
100 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 {
101 | color: inherit;
102 | }
103 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal hr {
104 | background-color: inherit;
105 | }
106 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal blockquote {
107 | border-color: inherit;
108 | }
109 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,
110 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {
111 | background: #fdf6e3;
112 | color: #657b83;
113 | border-color: #f8df9c;
114 | }
115 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal .highlight {
116 | background-color: inherit;
117 | }
118 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table th,
119 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table td {
120 | border-color: #f5d06c;
121 | }
122 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr {
123 | color: inherit;
124 | background-color: #fdf6e3;
125 | border-color: #444444;
126 | }
127 | .book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
128 | background-color: #fbeecb;
129 | }
130 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal {
131 | color: #bdcadb;
132 | }
133 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a {
134 | color: #3eb1d0;
135 | }
136 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
137 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2,
138 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h3,
139 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h4,
140 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h5,
141 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
142 | color: #fffffa;
143 | }
144 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
145 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2 {
146 | border-color: #373b4e;
147 | }
148 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
149 | color: #373b4e;
150 | }
151 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal hr {
152 | background-color: #373b4e;
153 | }
154 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal blockquote {
155 | border-color: #373b4e;
156 | }
157 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,
158 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code {
159 | color: #9dbed8;
160 | background: #2d3143;
161 | border-color: #2d3143;
162 | }
163 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal .highlight {
164 | background-color: #282a39;
165 | }
166 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th,
167 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td {
168 | border-color: #3b3f54;
169 | }
170 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr {
171 | color: #b6c2d2;
172 | background-color: #2d3143;
173 | border-color: #3b3f54;
174 | }
175 | .book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
176 | background-color: #35394b;
177 | }
178 | .book.color-theme-1 .book-header {
179 | color: #afa790;
180 | background: transparent;
181 | }
182 | .book.color-theme-1 .book-header .btn {
183 | color: #afa790;
184 | }
185 | .book.color-theme-1 .book-header .btn:hover {
186 | color: #73553c;
187 | background: none;
188 | }
189 | .book.color-theme-1 .book-header h1 {
190 | color: #704214;
191 | }
192 | .book.color-theme-2 .book-header {
193 | color: #7e888b;
194 | background: transparent;
195 | }
196 | .book.color-theme-2 .book-header .btn {
197 | color: #3b3f54;
198 | }
199 | .book.color-theme-2 .book-header .btn:hover {
200 | color: #fffff5;
201 | background: none;
202 | }
203 | .book.color-theme-2 .book-header h1 {
204 | color: #bdcadb;
205 | }
206 | .book.color-theme-1 .book-body .navigation {
207 | color: #afa790;
208 | }
209 | .book.color-theme-1 .book-body .navigation:hover {
210 | color: #73553c;
211 | }
212 | .book.color-theme-2 .book-body .navigation {
213 | color: #383f52;
214 | }
215 | .book.color-theme-2 .book-body .navigation:hover {
216 | color: #fffff5;
217 | }
218 | /*
219 | * Theme 1
220 | */
221 | .book.color-theme-1 .book-summary {
222 | color: #afa790;
223 | background: #111111;
224 | border-right: 1px solid rgba(0, 0, 0, 0.07);
225 | }
226 | .book.color-theme-1 .book-summary .book-search {
227 | background: transparent;
228 | }
229 | .book.color-theme-1 .book-summary .book-search input,
230 | .book.color-theme-1 .book-summary .book-search input:focus {
231 | border: 1px solid transparent;
232 | }
233 | .book.color-theme-1 .book-summary ul.summary li.divider {
234 | background: #7e888b;
235 | box-shadow: none;
236 | }
237 | .book.color-theme-1 .book-summary ul.summary li i.fa-check {
238 | color: #33cc33;
239 | }
240 | .book.color-theme-1 .book-summary ul.summary li.done > a {
241 | color: #877f6a;
242 | }
243 | .book.color-theme-1 .book-summary ul.summary li a,
244 | .book.color-theme-1 .book-summary ul.summary li span {
245 | color: #877f6a;
246 | background: transparent;
247 | font-weight: normal;
248 | }
249 | .book.color-theme-1 .book-summary ul.summary li.active > a,
250 | .book.color-theme-1 .book-summary ul.summary li a:hover {
251 | color: #704214;
252 | background: transparent;
253 | font-weight: normal;
254 | }
255 | /*
256 | * Theme 2
257 | */
258 | .book.color-theme-2 .book-summary {
259 | color: #bcc1d2;
260 | background: #2d3143;
261 | border-right: none;
262 | }
263 | .book.color-theme-2 .book-summary .book-search {
264 | background: transparent;
265 | }
266 | .book.color-theme-2 .book-summary .book-search input,
267 | .book.color-theme-2 .book-summary .book-search input:focus {
268 | border: 1px solid transparent;
269 | }
270 | .book.color-theme-2 .book-summary ul.summary li.divider {
271 | background: #272a3a;
272 | box-shadow: none;
273 | }
274 | .book.color-theme-2 .book-summary ul.summary li i.fa-check {
275 | color: #33cc33;
276 | }
277 | .book.color-theme-2 .book-summary ul.summary li.done > a {
278 | color: #62687f;
279 | }
280 | .book.color-theme-2 .book-summary ul.summary li a,
281 | .book.color-theme-2 .book-summary ul.summary li span {
282 | color: #c1c6d7;
283 | background: transparent;
284 | font-weight: 600;
285 | }
286 | .book.color-theme-2 .book-summary ul.summary li.active > a,
287 | .book.color-theme-2 .book-summary ul.summary li a:hover {
288 | color: #f4f4f5;
289 | background: #252737;
290 | font-weight: 600;
291 | }
292 |
--------------------------------------------------------------------------------
/docs/gitbook/gitbook-plugin-highlight/ebook.css:
--------------------------------------------------------------------------------
1 | pre,
2 | code {
3 | /* http://jmblog.github.io/color-themes-for-highlightjs */
4 | /* Tomorrow Comment */
5 | /* Tomorrow Red */
6 | /* Tomorrow Orange */
7 | /* Tomorrow Yellow */
8 | /* Tomorrow Green */
9 | /* Tomorrow Aqua */
10 | /* Tomorrow Blue */
11 | /* Tomorrow Purple */
12 | }
13 | pre .hljs-comment,
14 | code .hljs-comment,
15 | pre .hljs-title,
16 | code .hljs-title {
17 | color: #8e908c;
18 | }
19 | pre .hljs-variable,
20 | code .hljs-variable,
21 | pre .hljs-attribute,
22 | code .hljs-attribute,
23 | pre .hljs-tag,
24 | code .hljs-tag,
25 | pre .hljs-regexp,
26 | code .hljs-regexp,
27 | pre .hljs-deletion,
28 | code .hljs-deletion,
29 | pre .ruby .hljs-constant,
30 | code .ruby .hljs-constant,
31 | pre .xml .hljs-tag .hljs-title,
32 | code .xml .hljs-tag .hljs-title,
33 | pre .xml .hljs-pi,
34 | code .xml .hljs-pi,
35 | pre .xml .hljs-doctype,
36 | code .xml .hljs-doctype,
37 | pre .html .hljs-doctype,
38 | code .html .hljs-doctype,
39 | pre .css .hljs-id,
40 | code .css .hljs-id,
41 | pre .css .hljs-class,
42 | code .css .hljs-class,
43 | pre .css .hljs-pseudo,
44 | code .css .hljs-pseudo {
45 | color: #c82829;
46 | }
47 | pre .hljs-number,
48 | code .hljs-number,
49 | pre .hljs-preprocessor,
50 | code .hljs-preprocessor,
51 | pre .hljs-pragma,
52 | code .hljs-pragma,
53 | pre .hljs-built_in,
54 | code .hljs-built_in,
55 | pre .hljs-literal,
56 | code .hljs-literal,
57 | pre .hljs-params,
58 | code .hljs-params,
59 | pre .hljs-constant,
60 | code .hljs-constant {
61 | color: #f5871f;
62 | }
63 | pre .ruby .hljs-class .hljs-title,
64 | code .ruby .hljs-class .hljs-title,
65 | pre .css .hljs-rules .hljs-attribute,
66 | code .css .hljs-rules .hljs-attribute {
67 | color: #eab700;
68 | }
69 | pre .hljs-string,
70 | code .hljs-string,
71 | pre .hljs-value,
72 | code .hljs-value,
73 | pre .hljs-inheritance,
74 | code .hljs-inheritance,
75 | pre .hljs-header,
76 | code .hljs-header,
77 | pre .hljs-addition,
78 | code .hljs-addition,
79 | pre .ruby .hljs-symbol,
80 | code .ruby .hljs-symbol,
81 | pre .xml .hljs-cdata,
82 | code .xml .hljs-cdata {
83 | color: #718c00;
84 | }
85 | pre .css .hljs-hexcolor,
86 | code .css .hljs-hexcolor {
87 | color: #3e999f;
88 | }
89 | pre .hljs-function,
90 | code .hljs-function,
91 | pre .python .hljs-decorator,
92 | code .python .hljs-decorator,
93 | pre .python .hljs-title,
94 | code .python .hljs-title,
95 | pre .ruby .hljs-function .hljs-title,
96 | code .ruby .hljs-function .hljs-title,
97 | pre .ruby .hljs-title .hljs-keyword,
98 | code .ruby .hljs-title .hljs-keyword,
99 | pre .perl .hljs-sub,
100 | code .perl .hljs-sub,
101 | pre .javascript .hljs-title,
102 | code .javascript .hljs-title,
103 | pre .coffeescript .hljs-title,
104 | code .coffeescript .hljs-title {
105 | color: #4271ae;
106 | }
107 | pre .hljs-keyword,
108 | code .hljs-keyword,
109 | pre .javascript .hljs-function,
110 | code .javascript .hljs-function {
111 | color: #8959a8;
112 | }
113 | pre .hljs,
114 | code .hljs {
115 | display: block;
116 | background: white;
117 | color: #4d4d4c;
118 | padding: 0.5em;
119 | }
120 | pre .coffeescript .javascript,
121 | code .coffeescript .javascript,
122 | pre .javascript .xml,
123 | code .javascript .xml,
124 | pre .tex .hljs-formula,
125 | code .tex .hljs-formula,
126 | pre .xml .javascript,
127 | code .xml .javascript,
128 | pre .xml .vbscript,
129 | code .xml .vbscript,
130 | pre .xml .css,
131 | code .xml .css,
132 | pre .xml .hljs-cdata,
133 | code .xml .hljs-cdata {
134 | opacity: 0.5;
135 | }
136 |
--------------------------------------------------------------------------------
/docs/gitbook/gitbook-plugin-lunr/lunr.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.5.12
3 | * Copyright (C) 2015 Oliver Nightingale
4 | * MIT Licensed
5 | * @license
6 | */
7 | !function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.5.12",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(t){return arguments.length&&null!=t&&void 0!=t?Array.isArray(t)?t.map(function(t){return t.toLowerCase()}):t.toString().trim().toLowerCase().split(/[\s\-]+/):[]},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,o=0;n>o;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return o;t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o]}return r===t?o:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];i>1;)t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return r>t?o:t>r?o+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)break;a[i]!==h[o]?a[i]h[o]&&o++:(n.add(a[i]),i++,o++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;s0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,h=this,l=this.tokenStore.expand(e).reduce(function(n,o){var r=h.corpusTokens.indexOf(o),s=h.idf(o),l=1,u=new t.SortedSet;if(o!==e){var c=Math.max(3,o.length-e.length);l=1/Math.log(c)}return r>-1&&i.insert(r,a*s*l),Object.keys(h.tokenStore.get(o)).forEach(function(t){u.add(t)}),n.union(u)},new t.SortedSet);o.push(l)},this);var a=o.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,u=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,y=/^(.+?)(ed|ing)$/,g=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,P=/ll$/,N=new RegExp("^"+o+i+"[^aeiouwxy]$"),T=function(n){var i,o,r,s,a,h,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=y,s.test(n)){var T=s.exec(n);s=u,s.test(T[1])&&(s=g,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,l=x,a.test(n)?n+="e":h.test(n)?(s=g,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=k,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+t[o])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+e[o])}if(s=_,a=F,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=O,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=N,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=g,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==e?e:void 0},t.stopWordFilter.stopWords={a:"a",able:"able",about:"about",across:"across",after:"after",all:"all",almost:"almost",also:"also",am:"am",among:"among",an:"an",and:"and",any:"any",are:"are",as:"as",at:"at",be:"be",because:"because",been:"been",but:"but",by:"by",can:"can",cannot:"cannot",could:"could",dear:"dear",did:"did","do":"do",does:"does",either:"either","else":"else",ever:"ever",every:"every","for":"for",from:"from",get:"get",got:"got",had:"had",has:"has",have:"have",he:"he",her:"her",hers:"hers",him:"him",his:"his",how:"how",however:"however",i:"i","if":"if","in":"in",into:"into",is:"is",it:"it",its:"its",just:"just",least:"least",let:"let",like:"like",likely:"likely",may:"may",me:"me",might:"might",most:"most",must:"must",my:"my",neither:"neither",no:"no",nor:"nor",not:"not",of:"of",off:"off",often:"often",on:"on",only:"only",or:"or",other:"other",our:"our",own:"own",rather:"rather",said:"said",say:"say",says:"says",she:"she",should:"should",since:"since",so:"so",some:"some",than:"than",that:"that",the:"the",their:"their",them:"them",then:"then",there:"there",these:"these",they:"they","this":"this",tis:"tis",to:"to",too:"too",twas:"twas",us:"us",wants:"wants",was:"was",we:"we",were:"were",what:"what",when:"when",where:"where",which:"which","while":"while",who:"who",whom:"whom",why:"why",will:"will","with":"with",would:"would",yet:"yet",you:"you",your:"your"},t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){var e=t.replace(/^\W+/,"").replace(/\W+$/,"");return""===e?void 0:e},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;no;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(en.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t1;){if(r===t)return o;t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o]}return r===t?o:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];i>1;)t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return r>t?o:t>r?o+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)break;a[i]!==h[o]?a[i]h[o]&&o++:(n.add(a[i]),i++,o++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;s0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,h=this,l=this.tokenStore.expand(e).reduce(function(n,o){var r=h.corpusTokens.indexOf(o),s=h.idf(o),l=1,u=new t.SortedSet;if(o!==e){var c=Math.max(3,o.length-e.length);l=1/Math.log(c)}return r>-1&&i.insert(r,a*s*l),Object.keys(h.tokenStore.get(o)).forEach(function(t){u.add(t)}),n.union(u)},new t.SortedSet);o.push(l)},this);var a=o.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,u=new RegExp(s),c=new RegExp(h),f=new RegExp(a),d=new RegExp(l),p=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,v=/^(.+?)eed$/,y=/^(.+?)(ed|ing)$/,g=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,P=/ll$/,N=new RegExp("^"+o+i+"[^aeiouwxy]$"),T=function(n){var i,o,r,s,a,h,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=p,a=m,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=v,a=y,s.test(n)){var T=s.exec(n);s=u,s.test(T[1])&&(s=g,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=d,a.test(i)&&(n=i,a=S,h=w,l=x,a.test(n)?n+="e":h.test(n)?(s=g,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=k,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+t[o])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+e[o])}if(s=_,a=F,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=O,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=N,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=g,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return e&&t.stopWordFilter.stopWords[e]!==e?e:void 0},t.stopWordFilter.stopWords={a:"a",able:"able",about:"about",across:"across",after:"after",all:"all",almost:"almost",also:"also",am:"am",among:"among",an:"an",and:"and",any:"any",are:"are",as:"as",at:"at",be:"be",because:"because",been:"been",but:"but",by:"by",can:"can",cannot:"cannot",could:"could",dear:"dear",did:"did","do":"do",does:"does",either:"either","else":"else",ever:"ever",every:"every","for":"for",from:"from",get:"get",got:"got",had:"had",has:"has",have:"have",he:"he",her:"her",hers:"hers",him:"him",his:"his",how:"how",however:"however",i:"i","if":"if","in":"in",into:"into",is:"is",it:"it",its:"its",just:"just",least:"least",let:"let",like:"like",likely:"likely",may:"may",me:"me",might:"might",most:"most",must:"must",my:"my",neither:"neither",no:"no",nor:"nor",not:"not",of:"of",off:"off",often:"often",on:"on",only:"only",or:"or",other:"other",our:"our",own:"own",rather:"rather",said:"said",say:"say",says:"says",she:"she",should:"should",since:"since",so:"so",some:"some",than:"than",that:"that",the:"the",their:"their",them:"them",then:"then",there:"there",these:"these",they:"they","this":"this",tis:"tis",to:"to",too:"too",twas:"twas",us:"us",wants:"wants",was:"was",we:"we",were:"were",what:"what",when:"when",where:"where",which:"which","while":"while",who:"who",whom:"whom",why:"why",will:"will","with":"with",would:"would",yet:"yet",you:"you",your:"your"},t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){var e=t.replace(/^\W+/,"").replace(/\W+$/,"");return""===e?void 0:e},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n element for each result
48 | res.results.forEach(function(res) {
49 | var $li = $('', {
50 | 'class': 'search-results-item'
51 | });
52 |
53 | var $title = $('