{"action":"created","comment":{"url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments/212952742","pull_request_review_id":149684475,"id":212952742,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjk1Mjc0Mg==","diff_hunk":"@@ -43,23 +43,101 @@ object ApiOperations {\n     * @param order                  Sort items ascending or descending\n     */\n   case class Filter(\n-                     limit: Option[Int] = Some(10),\n-                     blockIDs: Option[Set[String]] = Some(Set[String]()),\n-                     levels: Option[Set[Int]] = Some(Set[Int]()),\n-                     chainIDs: Option[Set[String]] = Some(Set[String]()),\n-                     protocols: Option[Set[String]] = Some(Set[String]()),\n-                     operationGroupIDs: Option[Set[String]] = Some(Set[String]()),\n-                     operationSources: Option[Set[String]] = Some(Set[String]()),\n-                     operationDestinations: Option[Set[String]] = Some(Set[String]()),\n-                     operationParticipants: Option[Set[String]] = Some(Set[String]()),\n-                     operationKinds: Option[Set[String]] = Some(Set[String]()),\n-                     accountIDs: Option[Set[String]] = Some(Set[String]()),\n-                     accountManagers: Option[Set[String]] = Some(Set[String]()),\n-                     accountDelegates: Option[Set[String]] = Some(Set[String]()),\n+                     limit: Option[Int] = Some(defaultLimit),","path":"src/main/scala/tech/cryptonomic/conseil/tezos/ApiOperations.scala","position":49,"original_position":49,"commit_id":"551105bfdfe27e09d9478b10dba4e9caaa3c94fe","original_commit_id":"551105bfdfe27e09d9478b10dba4e9caaa3c94fe","user":{"login":"ivanopagano","id":1067461,"node_id":"MDQ6VXNlcjEwNjc0NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/1067461?v=4","gravatar_id":"","url":"https://api.github.com/users/ivanopagano","html_url":"https://github.com/ivanopagano","followers_url":"https://api.github.com/users/ivanopagano/followers","following_url":"https://api.github.com/users/ivanopagano/following{/other_user}","gists_url":"https://api.github.com/users/ivanopagano/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanopagano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanopagano/subscriptions","organizations_url":"https://api.github.com/users/ivanopagano/orgs","repos_url":"https://api.github.com/users/ivanopagano/repos","events_url":"https://api.github.com/users/ivanopagano/events{/privacy}","received_events_url":"https://api.github.com/users/ivanopagano/received_events","type":"User","site_admin":false},"body":"Removing duplicate code looks cleaner _to me_\r\n\r\nAlso the `defaultLimit` will be easier to pick up as a variable, and change it later, than having it buried within a block of code. Pulling out hardcoded values like this is usually considered best-practice","created_at":"2018-08-27T12:11:02Z","updated_at":"2018-08-27T12:11:02Z","html_url":"https://github.com/Cryptonomic/Conseil/pull/150#discussion_r212952742","pull_request_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/150","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments/212952742"},"html":{"href":"https://github.com/Cryptonomic/Conseil/pull/150#discussion_r212952742"},"pull_request":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/150"}},"in_reply_to_id":212698304},"pull_request":{"url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/150","id":210436633,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwNDM2NjMz","html_url":"https://github.com/Cryptonomic/Conseil/pull/150","diff_url":"https://github.com/Cryptonomic/Conseil/pull/150.diff","patch_url":"https://github.com/Cryptonomic/Conseil/pull/150.patch","issue_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/150","number":150,"state":"open","locked":false,"title":"WIP: Conseil-149: Simplify ApiOperations syntax and reduce duplication","user":{"login":"ivanopagano","id":1067461,"node_id":"MDQ6VXNlcjEwNjc0NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/1067461?v=4","gravatar_id":"","url":"https://api.github.com/users/ivanopagano","html_url":"https://github.com/ivanopagano","followers_url":"https://api.github.com/users/ivanopagano/followers","following_url":"https://api.github.com/users/ivanopagano/following{/other_user}","gists_url":"https://api.github.com/users/ivanopagano/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanopagano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanopagano/subscriptions","organizations_url":"https://api.github.com/users/ivanopagano/orgs","repos_url":"https://api.github.com/users/ivanopagano/repos","events_url":"https://api.github.com/users/ivanopagano/events{/privacy}","received_events_url":"https://api.github.com/users/ivanopagano/received_events","type":"User","site_admin":false},"body":" * extract common parts of logic\r\n * use table rows types instead of tupled colums\r\n * use scala lib functions to simplify as needed\r\n\r\nfixes #149 ","created_at":"2018-08-23T12:49:33Z","updated_at":"2018-08-27T12:11:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85e782fd20c31b4e9ea918d736cfd08d1e6deeca","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/150/commits","review_comments_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/150/comments","review_comment_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/150/comments","statuses_url":"https://api.github.com/repos/Cryptonomic/Conseil/statuses/551105bfdfe27e09d9478b10dba4e9caaa3c94fe","head":{"label":"Cryptonomic:CONSEIL-149-refactor-joined-filter-table","ref":"CONSEIL-149-refactor-joined-filter-table","sha":"551105bfdfe27e09d9478b10dba4e9caaa3c94fe","user":{"login":"Cryptonomic","id":34078414,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc4NDE0","avatar_url":"https://avatars0.githubusercontent.com/u/34078414?v=4","gravatar_id":"","url":"https://api.github.com/users/Cryptonomic","html_url":"https://github.com/Cryptonomic","followers_url":"https://api.github.com/users/Cryptonomic/followers","following_url":"https://api.github.com/users/Cryptonomic/following{/other_user}","gists_url":"https://api.github.com/users/Cryptonomic/gists{/gist_id}","starred_url":"https://api.github.com/users/Cryptonomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cryptonomic/subscriptions","organizations_url":"https://api.github.com/users/Cryptonomic/orgs","repos_url":"https://api.github.com/users/Cryptonomic/repos","events_url":"https://api.github.com/users/Cryptonomic/events{/privacy}","received_events_url":"https://api.github.com/users/Cryptonomic/received_events","type":"Organization","site_admin":false},"repo":{"id":112683908,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI2ODM5MDg=","name":"Conseil","full_name":"Cryptonomic/Conseil","owner":{"login":"Cryptonomic","id":34078414,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc4NDE0","avatar_url":"https://avatars0.githubusercontent.com/u/34078414?v=4","gravatar_id":"","url":"https://api.github.com/users/Cryptonomic","html_url":"https://github.com/Cryptonomic","followers_url":"https://api.github.com/users/Cryptonomic/followers","following_url":"https://api.github.com/users/Cryptonomic/following{/other_user}","gists_url":"https://api.github.com/users/Cryptonomic/gists{/gist_id}","starred_url":"https://api.github.com/users/Cryptonomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cryptonomic/subscriptions","organizations_url":"https://api.github.com/users/Cryptonomic/orgs","repos_url":"https://api.github.com/users/Cryptonomic/repos","events_url":"https://api.github.com/users/Cryptonomic/events{/privacy}","received_events_url":"https://api.github.com/users/Cryptonomic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Cryptonomic/Conseil","description":"Query API for decentralized platforms.","fork":false,"url":"https://api.github.com/repos/Cryptonomic/Conseil","forks_url":"https://api.github.com/repos/Cryptonomic/Conseil/forks","keys_url":"https://api.github.com/repos/Cryptonomic/Conseil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cryptonomic/Conseil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cryptonomic/Conseil/teams","hooks_url":"https://api.github.com/repos/Cryptonomic/Conseil/hooks","issue_events_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/events{/number}","events_url":"https://api.github.com/repos/Cryptonomic/Conseil/events","assignees_url":"https://api.github.com/repos/Cryptonomic/Conseil/assignees{/user}","branches_url":"https://api.github.com/repos/Cryptonomic/Conseil/branches{/branch}","tags_url":"https://api.github.com/repos/Cryptonomic/Conseil/tags","blobs_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cryptonomic/Conseil/statuses/{sha}","languages_url":"https://api.github.com/repos/Cryptonomic/Conseil/languages","stargazers_url":"https://api.github.com/repos/Cryptonomic/Conseil/stargazers","contributors_url":"https://api.github.com/repos/Cryptonomic/Conseil/contributors","subscribers_url":"https://api.github.com/repos/Cryptonomic/Conseil/subscribers","subscription_url":"https://api.github.com/repos/Cryptonomic/Conseil/subscription","commits_url":"https://api.github.com/repos/Cryptonomic/Conseil/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cryptonomic/Conseil/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cryptonomic/Conseil/contents/{+path}","compare_url":"https://api.github.com/repos/Cryptonomic/Conseil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cryptonomic/Conseil/merges","archive_url":"https://api.github.com/repos/Cryptonomic/Conseil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cryptonomic/Conseil/downloads","issues_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues{/number}","pulls_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls{/number}","milestones_url":"https://api.github.com/repos/Cryptonomic/Conseil/milestones{/number}","notifications_url":"https://api.github.com/repos/Cryptonomic/Conseil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cryptonomic/Conseil/labels{/name}","releases_url":"https://api.github.com/repos/Cryptonomic/Conseil/releases{/id}","deployments_url":"https://api.github.com/repos/Cryptonomic/Conseil/deployments","created_at":"2017-12-01T02:12:56Z","updated_at":"2018-08-24T18:49:04Z","pushed_at":"2018-08-27T12:07:12Z","git_url":"git://github.com/Cryptonomic/Conseil.git","ssh_url":"git@github.com:Cryptonomic/Conseil.git","clone_url":"https://github.com/Cryptonomic/Conseil.git","svn_url":"https://github.com/Cryptonomic/Conseil","homepage":"","size":1970,"stargazers_count":12,"watchers_count":12,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":31,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":2,"open_issues":31,"watchers":12,"default_branch":"master"}},"base":{"label":"Cryptonomic:master","ref":"master","sha":"8b3181dffa1fbdf6ad22c87e68407c449de4a16c","user":{"login":"Cryptonomic","id":34078414,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc4NDE0","avatar_url":"https://avatars0.githubusercontent.com/u/34078414?v=4","gravatar_id":"","url":"https://api.github.com/users/Cryptonomic","html_url":"https://github.com/Cryptonomic","followers_url":"https://api.github.com/users/Cryptonomic/followers","following_url":"https://api.github.com/users/Cryptonomic/following{/other_user}","gists_url":"https://api.github.com/users/Cryptonomic/gists{/gist_id}","starred_url":"https://api.github.com/users/Cryptonomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cryptonomic/subscriptions","organizations_url":"https://api.github.com/users/Cryptonomic/orgs","repos_url":"https://api.github.com/users/Cryptonomic/repos","events_url":"https://api.github.com/users/Cryptonomic/events{/privacy}","received_events_url":"https://api.github.com/users/Cryptonomic/received_events","type":"Organization","site_admin":false},"repo":{"id":112683908,"node_id":"MDEwOlJlcG9zaXRvcnkxMTI2ODM5MDg=","name":"Conseil","full_name":"Cryptonomic/Conseil","owner":{"login":"Cryptonomic","id":34078414,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDc4NDE0","avatar_url":"https://avatars0.githubusercontent.com/u/34078414?v=4","gravatar_id":"","url":"https://api.github.com/users/Cryptonomic","html_url":"https://github.com/Cryptonomic","followers_url":"https://api.github.com/users/Cryptonomic/followers","following_url":"https://api.github.com/users/Cryptonomic/following{/other_user}","gists_url":"https://api.github.com/users/Cryptonomic/gists{/gist_id}","starred_url":"https://api.github.com/users/Cryptonomic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cryptonomic/subscriptions","organizations_url":"https://api.github.com/users/Cryptonomic/orgs","repos_url":"https://api.github.com/users/Cryptonomic/repos","events_url":"https://api.github.com/users/Cryptonomic/events{/privacy}","received_events_url":"https://api.github.com/users/Cryptonomic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Cryptonomic/Conseil","description":"Query API for decentralized platforms.","fork":false,"url":"https://api.github.com/repos/Cryptonomic/Conseil","forks_url":"https://api.github.com/repos/Cryptonomic/Conseil/forks","keys_url":"https://api.github.com/repos/Cryptonomic/Conseil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cryptonomic/Conseil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cryptonomic/Conseil/teams","hooks_url":"https://api.github.com/repos/Cryptonomic/Conseil/hooks","issue_events_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/events{/number}","events_url":"https://api.github.com/repos/Cryptonomic/Conseil/events","assignees_url":"https://api.github.com/repos/Cryptonomic/Conseil/assignees{/user}","branches_url":"https://api.github.com/repos/Cryptonomic/Conseil/branches{/branch}","tags_url":"https://api.github.com/repos/Cryptonomic/Conseil/tags","blobs_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cryptonomic/Conseil/statuses/{sha}","languages_url":"https://api.github.com/repos/Cryptonomic/Conseil/languages","stargazers_url":"https://api.github.com/repos/Cryptonomic/Conseil/stargazers","contributors_url":"https://api.github.com/repos/Cryptonomic/Conseil/contributors","subscribers_url":"https://api.github.com/repos/Cryptonomic/Conseil/subscribers","subscription_url":"https://api.github.com/repos/Cryptonomic/Conseil/subscription","commits_url":"https://api.github.com/repos/Cryptonomic/Conseil/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cryptonomic/Conseil/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cryptonomic/Conseil/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cryptonomic/Conseil/contents/{+path}","compare_url":"https://api.github.com/repos/Cryptonomic/Conseil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cryptonomic/Conseil/merges","archive_url":"https://api.github.com/repos/Cryptonomic/Conseil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cryptonomic/Conseil/downloads","issues_url":"https://api.github.com/repos/Cryptonomic/Conseil/issues{/number}","pulls_url":"https://api.github.com/repos/Cryptonomic/Conseil/pulls{/number}","milestones_url":"https://api.github.com/repos/Cryptonomic/Conseil/milestones{/number}","notifications_url":"https://api.github.com/repos/Cryptonomic/Conseil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cryptonomic/Conseil/labels{/name}","releases_url":"https://api.github.com/repos/Cryptonomic/Conseil/releases{/id}","deployments_url":"https://api.github.com/repos/Cryptonomic/Conseil/deployments","created_at":"2017-12-01T02:12:56Z","updated_at":"2018-08-24T18:49:04Z","pushed_at":"2018-08-27T12:07:12Z","git_url":"git://github.com/Cryptonomic/Conseil.git","ssh_url":"git@github.com:Cryptonomic/Conseil.git","clone_url":"https://github.com/Cryptonomic/Conseil.git","svn_url":"https://github.com/Cryptonomic/Conseil","homepage":"","size":1970,"stargazers_count":12,"watchers_count":12,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":31,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":2,"open_issues":31,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/150"},"html":{"href":"https://github.com/Cryptonomic/Conseil/pull/150"},"issue":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/issues/150"},"comments":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/issues/150/comments"},"review_comments":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/150/comments"},"review_comment":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/pulls/150/commits"},"statuses":{"href":"https://api.github.com/repos/Cryptonomic/Conseil/statuses/551105bfdfe27e09d9478b10dba4e9caaa3c94fe"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ivanopagano"}}