{"action":"created","issue":{"url":"https://api.github.com/repos/AgilionApps/ja_resource/issues/11","repository_url":"https://api.github.com/repos/AgilionApps/ja_resource","labels_url":"https://api.github.com/repos/AgilionApps/ja_resource/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/AgilionApps/ja_resource/issues/11/comments","events_url":"https://api.github.com/repos/AgilionApps/ja_resource/issues/11/events","html_url":"https://github.com/AgilionApps/ja_resource/pull/11","id":131547948,"number":11,"title":"WIP: Adds Docs and Test","user":{"login":"alanpeabody","id":19368,"avatar_url":"https://avatars.githubusercontent.com/u/19368?v=3","gravatar_id":"","url":"https://api.github.com/users/alanpeabody","html_url":"https://github.com/alanpeabody","followers_url":"https://api.github.com/users/alanpeabody/followers","following_url":"https://api.github.com/users/alanpeabody/following{/other_user}","gists_url":"https://api.github.com/users/alanpeabody/gists{/gist_id}","starred_url":"https://api.github.com/users/alanpeabody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanpeabody/subscriptions","organizations_url":"https://api.github.com/users/alanpeabody/orgs","repos_url":"https://api.github.com/users/alanpeabody/repos","events_url":"https://api.github.com/users/alanpeabody/events{/privacy}","received_events_url":"https://api.github.com/users/alanpeabody/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-05T03:56:18Z","updated_at":"2016-02-15T14:56:18Z","closed_at":"2016-02-13T21:14:35Z","pull_request":{"url":"https://api.github.com/repos/AgilionApps/ja_resource/pulls/11","html_url":"https://github.com/AgilionApps/ja_resource/pull/11","diff_url":"https://github.com/AgilionApps/ja_resource/pull/11.diff","patch_url":"https://github.com/AgilionApps/ja_resource/pull/11.patch"},"body":"Initial code was developed/extracted from app with controller specs.\r\n\r\nIntent of this PR is to bring tests and docs up to a state that the lib is ready for public feedback and consumption.\r\n\r\nTODO:\r\n\r\n- [x] README intro\r\n- [x] Index action docs and tests\r\n- [x] Show action docs and tests\r\n- [x] Create action docs and tests\r\n- [x] Update action docs and tests\r\n- [x] Delete action docs and tests\r\n- [ ] Filter tests and docs\r\n- [ ] Sort tests and docs\r\n- [x] Record(s) docs and tests\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/AgilionApps/ja_resource/issues/comments/184238883","html_url":"https://github.com/AgilionApps/ja_resource/pull/11#issuecomment-184238883","issue_url":"https://api.github.com/repos/AgilionApps/ja_resource/issues/11","id":184238883,"user":{"login":"alanpeabody","id":19368,"avatar_url":"https://avatars.githubusercontent.com/u/19368?v=3","gravatar_id":"","url":"https://api.github.com/users/alanpeabody","html_url":"https://github.com/alanpeabody","followers_url":"https://api.github.com/users/alanpeabody/followers","following_url":"https://api.github.com/users/alanpeabody/following{/other_user}","gists_url":"https://api.github.com/users/alanpeabody/gists{/gist_id}","starred_url":"https://api.github.com/users/alanpeabody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanpeabody/subscriptions","organizations_url":"https://api.github.com/users/alanpeabody/orgs","repos_url":"https://api.github.com/users/alanpeabody/repos","events_url":"https://api.github.com/users/alanpeabody/events{/privacy}","received_events_url":"https://api.github.com/users/alanpeabody/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T14:56:18Z","updated_at":"2016-02-15T14:56:18Z","body":"Yeah, for pagination I would potentially like to make it super easy to add. I need to think through it a bit more, but on the serialization side the just passing the results of `MyApp.Repo.paginate/2` handles setting the meta for you. It is actually calling paginate with the correct params that needs to be added here.\r\n\r\nFilters and Sorts are supported in master, but I have not documented or written tests for them yet because I think the API should probably change.\r\n\r\nCurrently the filter callbacks would look like:\r\n\r\n```elixir\r\ndef filter(\"foo\", query, value) do\r\n  # apply foo filter to query (add a where or whatever)\r\nend\r\n\r\ndef filter(\"bar\", query, value) do\r\n  # apply bar filter to query (add a where or whatever)\r\nend\r\n\r\ndef filter(_, q, _), do: q\r\n```\r\n\r\nI don't think the argument order is quite right and I also think the conn should be an argument so you can filter based on conn state (eg, current user).\r\n\r\nI also wanted to take a look at making this an optional integration: https://github.com/DockYard/inquisitor"}}