{"action":"created","comment":{"url":"https://api.github.com/repos/colorgy/Core/pulls/comments/30170689","id":30170689,"diff_hunk":"@@ -71,11 +71,57 @@ def data_api_params_schema_array\n   scope :local, if: proc { current_admin.root? }\n \n   filter :name\n+  filter :table_name\n   filter :path\n+  filter :accessible\n+  filter :public\n+  filter :owned_by_user\n+  filter :owner_writable\n   filter :created_at\n   filter :updated_at\n \n   sidebar \"資料集 API\" do\n+    para '以資料庫中資料為基礎提供的 API 資源。預設將資料存放在系統的「資料集」資料庫中，並由系統自動維護資料表；亦可設定連線進其他資料庫來取得資料製作成 API。'\n+    para '只要資料集裡有欄位存放的是使用者的 <code>id</code>、<code>uuid</code>、<code>email</code> 或 <code>uid</code>，就能設定資料與使用者的關聯，進而開啟 OAuth 認證來取得個別使用者資料的功能。'.html_safe\n+    para '相關名詞解釋如下：'\n+    dl do\n+      dt '開放使用'\n+      dd '是否開放此 API 的使用？'\n+      dt '公開'\n+      dd '是否讓此 API 能夠透過公開路徑存取？若開啟，則任何人可由 <code>/api/&lt;API_存取路徑&gt;</code> 存取此 API。注意這不會影響經過認證的個別使用者所屬資料存取 (<code>/api/v1/me/&lt;API_存取路徑&gt;</code>)。'.html_safe\n+      dt '名稱'\n+      dd '此 API 資源的識別名稱，僅可使用小寫字母、數字與底線。'\n+      dt '資料表名稱'\n+      dd '此資料集在資料庫中的資料表名稱。'\n+      dt 'API 存取路徑'\n+      dd '此 API 的存取路徑。將影響公開存取 (<code>/api/&lt;API_存取路徑&gt;</code>) 與個別使用者的私有存取 (<code>/api/v1/me/&lt;API_存取路徑&gt;</code>)。'.html_safe\n+      dt '所屬組織'\n+      dd '將影響此 API 的歸類、管理權限，以及透過使用者的「唯一識別碼」所建立的擁有者關聯。'\n+      dt '資料欄位 (schema)'\n+      dd '設定資料表的欄位。若使用非由本系統維護的外部資料庫，則只有經設定的資料欄位可以被存取。'\n+      dt '主鍵'\n+      dd '<code>primary key</code>，將影響此 API 特定資源的存取方式。例如設定為「<code>title</code>」，則可以由 <code>/api/&lt;API_存取路徑&gt;/Hello</code> 取得 <code>title</code> 為 「Hello」的項目資料。'.html_safe","path":"app/admin/data_apis.rb","position":51,"original_position":51,"commit_id":"747bb836c4a468ecdbb62a23d93eed19246a86fa","original_commit_id":"747bb836c4a468ecdbb62a23d93eed19246a86fa","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Line is too long. [174/80]<br>Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-05-12T19:25:53Z","updated_at":"2015-05-12T19:25:53Z","html_url":"https://github.com/colorgy/Core/pull/7#discussion_r30170689","pull_request_url":"https://api.github.com/repos/colorgy/Core/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/colorgy/Core/pulls/comments/30170689"},"html":{"href":"https://github.com/colorgy/Core/pull/7#discussion_r30170689"},"pull_request":{"href":"https://api.github.com/repos/colorgy/Core/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/colorgy/Core/pulls/7","id":35244956,"html_url":"https://github.com/colorgy/Core/pull/7","diff_url":"https://github.com/colorgy/Core/pull/7.diff","patch_url":"https://github.com/colorgy/Core/pull/7.patch","issue_url":"https://api.github.com/repos/colorgy/Core/issues/7","number":7,"state":"open","locked":false,"title":"Writable user-scoped data API","user":{"login":"Neson","id":3784687,"avatar_url":"https://avatars.githubusercontent.com/u/3784687?v=3","gravatar_id":"","url":"https://api.github.com/users/Neson","html_url":"https://github.com/Neson","followers_url":"https://api.github.com/users/Neson/followers","following_url":"https://api.github.com/users/Neson/following{/other_user}","gists_url":"https://api.github.com/users/Neson/gists{/gist_id}","starred_url":"https://api.github.com/users/Neson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neson/subscriptions","organizations_url":"https://api.github.com/users/Neson/orgs","repos_url":"https://api.github.com/users/Neson/repos","events_url":"https://api.github.com/users/Neson/events{/privacy}","received_events_url":"https://api.github.com/users/Neson/received_events","type":"User","site_admin":false},"body":"closes #2 and #5","created_at":"2015-05-12T16:29:25Z","updated_at":"2015-05-12T19:25:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3369485e38bf23f9aa78dc71752ded013aa799cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/colorgy/Core/pulls/7/commits","review_comments_url":"https://api.github.com/repos/colorgy/Core/pulls/7/comments","review_comment_url":"https://api.github.com/repos/colorgy/Core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/colorgy/Core/issues/7/comments","statuses_url":"https://api.github.com/repos/colorgy/Core/statuses/747bb836c4a468ecdbb62a23d93eed19246a86fa","head":{"label":"colorgy:data-api","ref":"data-api","sha":"747bb836c4a468ecdbb62a23d93eed19246a86fa","user":{"login":"colorgy","id":9701622,"avatar_url":"https://avatars.githubusercontent.com/u/9701622?v=3","gravatar_id":"","url":"https://api.github.com/users/colorgy","html_url":"https://github.com/colorgy","followers_url":"https://api.github.com/users/colorgy/followers","following_url":"https://api.github.com/users/colorgy/following{/other_user}","gists_url":"https://api.github.com/users/colorgy/gists{/gist_id}","starred_url":"https://api.github.com/users/colorgy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colorgy/subscriptions","organizations_url":"https://api.github.com/users/colorgy/orgs","repos_url":"https://api.github.com/users/colorgy/repos","events_url":"https://api.github.com/users/colorgy/events{/privacy}","received_events_url":"https://api.github.com/users/colorgy/received_events","type":"Organization","site_admin":false},"repo":{"id":28130013,"name":"Core","full_name":"colorgy/Core","owner":{"login":"colorgy","id":9701622,"avatar_url":"https://avatars.githubusercontent.com/u/9701622?v=3","gravatar_id":"","url":"https://api.github.com/users/colorgy","html_url":"https://github.com/colorgy","followers_url":"https://api.github.com/users/colorgy/followers","following_url":"https://api.github.com/users/colorgy/following{/other_user}","gists_url":"https://api.github.com/users/colorgy/gists{/gist_id}","starred_url":"https://api.github.com/users/colorgy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colorgy/subscriptions","organizations_url":"https://api.github.com/users/colorgy/orgs","repos_url":"https://api.github.com/users/colorgy/repos","events_url":"https://api.github.com/users/colorgy/events{/privacy}","received_events_url":"https://api.github.com/users/colorgy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/colorgy/Core","description":"開放的校園服務平台。(in development)","fork":false,"url":"https://api.github.com/repos/colorgy/Core","forks_url":"https://api.github.com/repos/colorgy/Core/forks","keys_url":"https://api.github.com/repos/colorgy/Core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/colorgy/Core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/colorgy/Core/teams","hooks_url":"https://api.github.com/repos/colorgy/Core/hooks","issue_events_url":"https://api.github.com/repos/colorgy/Core/issues/events{/number}","events_url":"https://api.github.com/repos/colorgy/Core/events","assignees_url":"https://api.github.com/repos/colorgy/Core/assignees{/user}","branches_url":"https://api.github.com/repos/colorgy/Core/branches{/branch}","tags_url":"https://api.github.com/repos/colorgy/Core/tags","blobs_url":"https://api.github.com/repos/colorgy/Core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/colorgy/Core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/colorgy/Core/git/refs{/sha}","trees_url":"https://api.github.com/repos/colorgy/Core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/colorgy/Core/statuses/{sha}","languages_url":"https://api.github.com/repos/colorgy/Core/languages","stargazers_url":"https://api.github.com/repos/colorgy/Core/stargazers","contributors_url":"https://api.github.com/repos/colorgy/Core/contributors","subscribers_url":"https://api.github.com/repos/colorgy/Core/subscribers","subscription_url":"https://api.github.com/repos/colorgy/Core/subscription","commits_url":"https://api.github.com/repos/colorgy/Core/commits{/sha}","git_commits_url":"https://api.github.com/repos/colorgy/Core/git/commits{/sha}","comments_url":"https://api.github.com/repos/colorgy/Core/comments{/number}","issue_comment_url":"https://api.github.com/repos/colorgy/Core/issues/comments{/number}","contents_url":"https://api.github.com/repos/colorgy/Core/contents/{+path}","compare_url":"https://api.github.com/repos/colorgy/Core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/colorgy/Core/merges","archive_url":"https://api.github.com/repos/colorgy/Core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/colorgy/Core/downloads","issues_url":"https://api.github.com/repos/colorgy/Core/issues{/number}","pulls_url":"https://api.github.com/repos/colorgy/Core/pulls{/number}","milestones_url":"https://api.github.com/repos/colorgy/Core/milestones{/number}","notifications_url":"https://api.github.com/repos/colorgy/Core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/colorgy/Core/labels{/name}","releases_url":"https://api.github.com/repos/colorgy/Core/releases{/id}","created_at":"2014-12-17T09:17:48Z","updated_at":"2015-05-12T16:36:16Z","pushed_at":"2015-05-12T19:25:41Z","git_url":"git://github.com/colorgy/Core.git","ssh_url":"git@github.com:colorgy/Core.git","clone_url":"https://github.com/colorgy/Core.git","svn_url":"https://github.com/colorgy/Core","homepage":"","size":2342,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":5,"default_branch":"master"}},"base":{"label":"colorgy:master","ref":"master","sha":"5c8ff7d77f9dcd711245455fffbffe1c06a5f8f6","user":{"login":"colorgy","id":9701622,"avatar_url":"https://avatars.githubusercontent.com/u/9701622?v=3","gravatar_id":"","url":"https://api.github.com/users/colorgy","html_url":"https://github.com/colorgy","followers_url":"https://api.github.com/users/colorgy/followers","following_url":"https://api.github.com/users/colorgy/following{/other_user}","gists_url":"https://api.github.com/users/colorgy/gists{/gist_id}","starred_url":"https://api.github.com/users/colorgy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colorgy/subscriptions","organizations_url":"https://api.github.com/users/colorgy/orgs","repos_url":"https://api.github.com/users/colorgy/repos","events_url":"https://api.github.com/users/colorgy/events{/privacy}","received_events_url":"https://api.github.com/users/colorgy/received_events","type":"Organization","site_admin":false},"repo":{"id":28130013,"name":"Core","full_name":"colorgy/Core","owner":{"login":"colorgy","id":9701622,"avatar_url":"https://avatars.githubusercontent.com/u/9701622?v=3","gravatar_id":"","url":"https://api.github.com/users/colorgy","html_url":"https://github.com/colorgy","followers_url":"https://api.github.com/users/colorgy/followers","following_url":"https://api.github.com/users/colorgy/following{/other_user}","gists_url":"https://api.github.com/users/colorgy/gists{/gist_id}","starred_url":"https://api.github.com/users/colorgy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colorgy/subscriptions","organizations_url":"https://api.github.com/users/colorgy/orgs","repos_url":"https://api.github.com/users/colorgy/repos","events_url":"https://api.github.com/users/colorgy/events{/privacy}","received_events_url":"https://api.github.com/users/colorgy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/colorgy/Core","description":"開放的校園服務平台。(in development)","fork":false,"url":"https://api.github.com/repos/colorgy/Core","forks_url":"https://api.github.com/repos/colorgy/Core/forks","keys_url":"https://api.github.com/repos/colorgy/Core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/colorgy/Core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/colorgy/Core/teams","hooks_url":"https://api.github.com/repos/colorgy/Core/hooks","issue_events_url":"https://api.github.com/repos/colorgy/Core/issues/events{/number}","events_url":"https://api.github.com/repos/colorgy/Core/events","assignees_url":"https://api.github.com/repos/colorgy/Core/assignees{/user}","branches_url":"https://api.github.com/repos/colorgy/Core/branches{/branch}","tags_url":"https://api.github.com/repos/colorgy/Core/tags","blobs_url":"https://api.github.com/repos/colorgy/Core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/colorgy/Core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/colorgy/Core/git/refs{/sha}","trees_url":"https://api.github.com/repos/colorgy/Core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/colorgy/Core/statuses/{sha}","languages_url":"https://api.github.com/repos/colorgy/Core/languages","stargazers_url":"https://api.github.com/repos/colorgy/Core/stargazers","contributors_url":"https://api.github.com/repos/colorgy/Core/contributors","subscribers_url":"https://api.github.com/repos/colorgy/Core/subscribers","subscription_url":"https://api.github.com/repos/colorgy/Core/subscription","commits_url":"https://api.github.com/repos/colorgy/Core/commits{/sha}","git_commits_url":"https://api.github.com/repos/colorgy/Core/git/commits{/sha}","comments_url":"https://api.github.com/repos/colorgy/Core/comments{/number}","issue_comment_url":"https://api.github.com/repos/colorgy/Core/issues/comments{/number}","contents_url":"https://api.github.com/repos/colorgy/Core/contents/{+path}","compare_url":"https://api.github.com/repos/colorgy/Core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/colorgy/Core/merges","archive_url":"https://api.github.com/repos/colorgy/Core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/colorgy/Core/downloads","issues_url":"https://api.github.com/repos/colorgy/Core/issues{/number}","pulls_url":"https://api.github.com/repos/colorgy/Core/pulls{/number}","milestones_url":"https://api.github.com/repos/colorgy/Core/milestones{/number}","notifications_url":"https://api.github.com/repos/colorgy/Core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/colorgy/Core/labels{/name}","releases_url":"https://api.github.com/repos/colorgy/Core/releases{/id}","created_at":"2014-12-17T09:17:48Z","updated_at":"2015-05-12T16:36:16Z","pushed_at":"2015-05-12T19:25:41Z","git_url":"git://github.com/colorgy/Core.git","ssh_url":"git@github.com:colorgy/Core.git","clone_url":"https://github.com/colorgy/Core.git","svn_url":"https://github.com/colorgy/Core","homepage":"","size":2342,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/colorgy/Core/pulls/7"},"html":{"href":"https://github.com/colorgy/Core/pull/7"},"issue":{"href":"https://api.github.com/repos/colorgy/Core/issues/7"},"comments":{"href":"https://api.github.com/repos/colorgy/Core/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/colorgy/Core/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/colorgy/Core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/colorgy/Core/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/colorgy/Core/statuses/747bb836c4a468ecdbb62a23d93eed19246a86fa"}}}}