{"action":"created","comment":{"url":"https://api.github.com/repos/openstax/tutor-server/pulls/comments/25511013","id":25511013,"diff_hunk":"@@ -0,0 +1,9 @@\n+module Api::V1\n+  class ReadingSearchRepresenter < Roar::Decorator\n+\n+    include Roar::Representer::JSON\n+\n+    collection :items","path":"app/representers/api/v1/reading_search_representer.rb","position":6,"original_position":6,"commit_id":"a46ee727de9fbf69ae4f01138541fa043151f1fe","original_commit_id":"a46ee727de9fbf69ae4f01138541fa043151f1fe","user":{"login":"Dantemss","id":1017808,"avatar_url":"https://avatars.githubusercontent.com/u/1017808?v=3","gravatar_id":"","url":"https://api.github.com/users/Dantemss","html_url":"https://github.com/Dantemss","followers_url":"https://api.github.com/users/Dantemss/followers","following_url":"https://api.github.com/users/Dantemss/following{/other_user}","gists_url":"https://api.github.com/users/Dantemss/gists{/gist_id}","starred_url":"https://api.github.com/users/Dantemss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dantemss/subscriptions","organizations_url":"https://api.github.com/users/Dantemss/orgs","repos_url":"https://api.github.com/users/Dantemss/repos","events_url":"https://api.github.com/users/Dantemss/events{/privacy}","received_events_url":"https://api.github.com/users/Dantemss/received_events","type":"User","site_admin":false},"body":"I'd add the total_count too so the API doesn't change later if we have to add it. This can be done by inheriting from the abstract search representer, like in: https://github.com/openstax/tutor-server/blob/master/app/representers/api/v1/task_search_representer.rb","created_at":"2015-02-27T14:54:11Z","updated_at":"2015-02-27T14:54:11Z","html_url":"https://github.com/openstax/tutor-server/pull/64#discussion_r25511013","pull_request_url":"https://api.github.com/repos/openstax/tutor-server/pulls/64","_links":{"self":{"href":"https://api.github.com/repos/openstax/tutor-server/pulls/comments/25511013"},"html":{"href":"https://github.com/openstax/tutor-server/pull/64#discussion_r25511013"},"pull_request":{"href":"https://api.github.com/repos/openstax/tutor-server/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/openstax/tutor-server/pulls/64","id":30145998,"html_url":"https://github.com/openstax/tutor-server/pull/64","diff_url":"https://github.com/openstax/tutor-server/pull/64.diff","patch_url":"https://github.com/openstax/tutor-server/pull/64.patch","issue_url":"https://api.github.com/repos/openstax/tutor-server/issues/64","number":64,"state":"open","locked":false,"title":"WIP content subsystem and start of course readings APIs","user":{"login":"jpslav","id":1001691,"avatar_url":"https://avatars.githubusercontent.com/u/1001691?v=3","gravatar_id":"","url":"https://api.github.com/users/jpslav","html_url":"https://github.com/jpslav","followers_url":"https://api.github.com/users/jpslav/followers","following_url":"https://api.github.com/users/jpslav/following{/other_user}","gists_url":"https://api.github.com/users/jpslav/gists{/gist_id}","starred_url":"https://api.github.com/users/jpslav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpslav/subscriptions","organizations_url":"https://api.github.com/users/jpslav/orgs","repos_url":"https://api.github.com/users/jpslav/repos","events_url":"https://api.github.com/users/jpslav/events{/privacy}","received_events_url":"https://api.github.com/users/jpslav/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-27T07:13:04Z","updated_at":"2015-02-27T14:54:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df0c4367077565699e19895238caec3ddba8beb1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openstax/tutor-server/pulls/64/commits","review_comments_url":"https://api.github.com/repos/openstax/tutor-server/pulls/64/comments","review_comment_url":"https://api.github.com/repos/openstax/tutor-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openstax/tutor-server/issues/64/comments","statuses_url":"https://api.github.com/repos/openstax/tutor-server/statuses/a46ee727de9fbf69ae4f01138541fa043151f1fe","head":{"label":"openstax:jpslav-course-content-apis","ref":"jpslav-course-content-apis","sha":"a46ee727de9fbf69ae4f01138541fa043151f1fe","user":{"login":"openstax","id":3805549,"avatar_url":"https://avatars.githubusercontent.com/u/3805549?v=3","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"repo":{"id":24337612,"name":"tutor-server","full_name":"openstax/tutor-server","owner":{"login":"openstax","id":3805549,"avatar_url":"https://avatars.githubusercontent.com/u/3805549?v=3","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openstax/tutor-server","description":"OpenStax Tutor 3.0 Backend","fork":false,"url":"https://api.github.com/repos/openstax/tutor-server","forks_url":"https://api.github.com/repos/openstax/tutor-server/forks","keys_url":"https://api.github.com/repos/openstax/tutor-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openstax/tutor-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openstax/tutor-server/teams","hooks_url":"https://api.github.com/repos/openstax/tutor-server/hooks","issue_events_url":"https://api.github.com/repos/openstax/tutor-server/issues/events{/number}","events_url":"https://api.github.com/repos/openstax/tutor-server/events","assignees_url":"https://api.github.com/repos/openstax/tutor-server/assignees{/user}","branches_url":"https://api.github.com/repos/openstax/tutor-server/branches{/branch}","tags_url":"https://api.github.com/repos/openstax/tutor-server/tags","blobs_url":"https://api.github.com/repos/openstax/tutor-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openstax/tutor-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openstax/tutor-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/openstax/tutor-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openstax/tutor-server/statuses/{sha}","languages_url":"https://api.github.com/repos/openstax/tutor-server/languages","stargazers_url":"https://api.github.com/repos/openstax/tutor-server/stargazers","contributors_url":"https://api.github.com/repos/openstax/tutor-server/contributors","subscribers_url":"https://api.github.com/repos/openstax/tutor-server/subscribers","subscription_url":"https://api.github.com/repos/openstax/tutor-server/subscription","commits_url":"https://api.github.com/repos/openstax/tutor-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/openstax/tutor-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/openstax/tutor-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/openstax/tutor-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/openstax/tutor-server/contents/{+path}","compare_url":"https://api.github.com/repos/openstax/tutor-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openstax/tutor-server/merges","archive_url":"https://api.github.com/repos/openstax/tutor-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openstax/tutor-server/downloads","issues_url":"https://api.github.com/repos/openstax/tutor-server/issues{/number}","pulls_url":"https://api.github.com/repos/openstax/tutor-server/pulls{/number}","milestones_url":"https://api.github.com/repos/openstax/tutor-server/milestones{/number}","notifications_url":"https://api.github.com/repos/openstax/tutor-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openstax/tutor-server/labels{/name}","releases_url":"https://api.github.com/repos/openstax/tutor-server/releases{/id}","created_at":"2014-09-22T17:10:29Z","updated_at":"2015-02-26T23:37:39Z","pushed_at":"2015-02-27T07:36:48Z","git_url":"git://github.com/openstax/tutor-server.git","ssh_url":"git@github.com:openstax/tutor-server.git","clone_url":"https://github.com/openstax/tutor-server.git","svn_url":"https://github.com/openstax/tutor-server","homepage":"","size":10586,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":12,"forks":3,"open_issues":12,"watchers":1,"default_branch":"master"}},"base":{"label":"openstax:master","ref":"master","sha":"9c130270f051c1fd9bbc67830e10837f1135ea4e","user":{"login":"openstax","id":3805549,"avatar_url":"https://avatars.githubusercontent.com/u/3805549?v=3","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"repo":{"id":24337612,"name":"tutor-server","full_name":"openstax/tutor-server","owner":{"login":"openstax","id":3805549,"avatar_url":"https://avatars.githubusercontent.com/u/3805549?v=3","gravatar_id":"","url":"https://api.github.com/users/openstax","html_url":"https://github.com/openstax","followers_url":"https://api.github.com/users/openstax/followers","following_url":"https://api.github.com/users/openstax/following{/other_user}","gists_url":"https://api.github.com/users/openstax/gists{/gist_id}","starred_url":"https://api.github.com/users/openstax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openstax/subscriptions","organizations_url":"https://api.github.com/users/openstax/orgs","repos_url":"https://api.github.com/users/openstax/repos","events_url":"https://api.github.com/users/openstax/events{/privacy}","received_events_url":"https://api.github.com/users/openstax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openstax/tutor-server","description":"OpenStax Tutor 3.0 Backend","fork":false,"url":"https://api.github.com/repos/openstax/tutor-server","forks_url":"https://api.github.com/repos/openstax/tutor-server/forks","keys_url":"https://api.github.com/repos/openstax/tutor-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openstax/tutor-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openstax/tutor-server/teams","hooks_url":"https://api.github.com/repos/openstax/tutor-server/hooks","issue_events_url":"https://api.github.com/repos/openstax/tutor-server/issues/events{/number}","events_url":"https://api.github.com/repos/openstax/tutor-server/events","assignees_url":"https://api.github.com/repos/openstax/tutor-server/assignees{/user}","branches_url":"https://api.github.com/repos/openstax/tutor-server/branches{/branch}","tags_url":"https://api.github.com/repos/openstax/tutor-server/tags","blobs_url":"https://api.github.com/repos/openstax/tutor-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openstax/tutor-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openstax/tutor-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/openstax/tutor-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openstax/tutor-server/statuses/{sha}","languages_url":"https://api.github.com/repos/openstax/tutor-server/languages","stargazers_url":"https://api.github.com/repos/openstax/tutor-server/stargazers","contributors_url":"https://api.github.com/repos/openstax/tutor-server/contributors","subscribers_url":"https://api.github.com/repos/openstax/tutor-server/subscribers","subscription_url":"https://api.github.com/repos/openstax/tutor-server/subscription","commits_url":"https://api.github.com/repos/openstax/tutor-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/openstax/tutor-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/openstax/tutor-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/openstax/tutor-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/openstax/tutor-server/contents/{+path}","compare_url":"https://api.github.com/repos/openstax/tutor-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openstax/tutor-server/merges","archive_url":"https://api.github.com/repos/openstax/tutor-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openstax/tutor-server/downloads","issues_url":"https://api.github.com/repos/openstax/tutor-server/issues{/number}","pulls_url":"https://api.github.com/repos/openstax/tutor-server/pulls{/number}","milestones_url":"https://api.github.com/repos/openstax/tutor-server/milestones{/number}","notifications_url":"https://api.github.com/repos/openstax/tutor-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openstax/tutor-server/labels{/name}","releases_url":"https://api.github.com/repos/openstax/tutor-server/releases{/id}","created_at":"2014-09-22T17:10:29Z","updated_at":"2015-02-26T23:37:39Z","pushed_at":"2015-02-27T07:36:48Z","git_url":"git://github.com/openstax/tutor-server.git","ssh_url":"git@github.com:openstax/tutor-server.git","clone_url":"https://github.com/openstax/tutor-server.git","svn_url":"https://github.com/openstax/tutor-server","homepage":"","size":10586,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":12,"forks":3,"open_issues":12,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openstax/tutor-server/pulls/64"},"html":{"href":"https://github.com/openstax/tutor-server/pull/64"},"issue":{"href":"https://api.github.com/repos/openstax/tutor-server/issues/64"},"comments":{"href":"https://api.github.com/repos/openstax/tutor-server/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/openstax/tutor-server/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/openstax/tutor-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openstax/tutor-server/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/openstax/tutor-server/statuses/a46ee727de9fbf69ae4f01138541fa043151f1fe"}}}}