{"action":"created","comment":{"url":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/comments/26057978","id":26057978,"diff_hunk":"@@ -19,118 +19,206 @@\n <div id=\"widget\" class=\"widget\"></div>\n \n <script type=\"text/javascript\">\n+  var countries = [\"Iraq\", \"Syria\"];\n \n   riverWidget = BeatBlocks.widget('river', {\n     template: Handlebars.templates['river.hbs'],\n-    countries: [\n-      \"Syria\",\n-      \"Iraq\"\n-    ],\n-    content: [\n+    filters: [\n       {\n-        type: \"reports\",\n-        title: \"REPORTS\",\n-        icon: \"un-icon-product_type_report\",\n-        filters: [\n-          {\n-            linkTitle: \"Situation reports by UN agencies\",\n-            location: \"http://reliefweb.int/updates?advanced-search=(C226.C122)_(F10)_(ST272)#content\"\n-          },\n-          {\n-            linkTitle: \"Situation reports by NGOs\",\n-            location: \"http://reliefweb.int/updates?advanced-search=(C226.C122)_(F10)_(ST274)#content\"\n-          },\n-          {\n-            linkTitle: \"Analysis\",\n-            location: \"http://reliefweb.int/updates?advanced-search=(C226.C122)_(F3)#content\"\n-          },\n-          {\n-            linkTitle: \"Assessments\",\n-            location: \"http://reliefweb.int/updates?advanced-search=(C226.C122)_(F5)#content\"\n-          },\n-          {\n-            linkTitle: \"Appeals and contributions\",\n-            location: \"http://reliefweb.int/updates?advanced-search=(C226.C122)_(F4.T4589)_!(PC254)#content\"\n-          },\n-          {\n-            linkTitle: \"Aid agency news\",\n-            location: \"http://reliefweb.int/updates?advanced-search=(C226.C122)_(F10)_(ST274)#content\"\n-          },\n-          {\n-            linkTitle: \"Media news\",\n-            location: \"http://reliefweb.int/updates?advanced-search=(C226.C122)_(ST273)#content\"\n-          },\n-          {\n-            linkTitle: \"Evaluations and Lessons Learned\",\n-            location: \"http://reliefweb.int/updates?advanced-search=(C226.C122)_!(PC254)&format=6#content\"\n-          },\n-          {\n-            linkTitle: \"Reports in Arabic\",\n-            location: \"http://reliefweb.int/updates?advanced-search=%28C226.C122%29&language=6876#content\"\n-          }\n-        ]\n+        id: \"situation-reports\",\n+        title: \"Situation reports by UN agencies\",\n+        location: \"http://reliefweb.int/updates?advanced-search=(C226.C122)_(F10)_(ST272)#content\",\n+        filters: {\n+          operator: \"AND\",\n+          conditions: [\n+            {\n+              \"field\": \"country\",\n+              \"value\": countries\n+            },\n+            {\n+              \"field\": \"format.name\",\n+              \"value\": \"Situation Report\"\n+            },\n+            {\n+              \"field\": \"source.type.name\",\n+              \"value\": \"International Organization\"\n+            }\n+          ]\n+        }","path":"example/river.html","position":75,"original_position":75,"commit_id":"23fc80b9ef0938ca4b25e7e4e5a5fdb78e497f34","original_commit_id":"23fc80b9ef0938ca4b25e7e4e5a5fdb78e497f34","user":{"login":"grayside","id":283489,"avatar_url":"https://avatars.githubusercontent.com/u/283489?v=3","gravatar_id":"","url":"https://api.github.com/users/grayside","html_url":"https://github.com/grayside","followers_url":"https://api.github.com/users/grayside/followers","following_url":"https://api.github.com/users/grayside/following{/other_user}","gists_url":"https://api.github.com/users/grayside/gists{/gist_id}","starred_url":"https://api.github.com/users/grayside/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grayside/subscriptions","organizations_url":"https://api.github.com/users/grayside/orgs","repos_url":"https://api.github.com/users/grayside/repos","events_url":"https://api.github.com/users/grayside/events{/privacy}","received_events_url":"https://api.github.com/users/grayside/received_events","type":"User","site_admin":false},"body":"Is this section an example of a single \"filter\" link? If so most of this seems like it should go to configuration. Location is a complete link to reliefweb.int, filters seems like a query fragment for the API request.","created_at":"2015-03-09T17:46:47Z","updated_at":"2015-03-09T17:46:47Z","html_url":"https://github.com/reliefweb/rw-widget.js/pull/45#discussion_r26057978","pull_request_url":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/comments/26057978"},"html":{"href":"https://github.com/reliefweb/rw-widget.js/pull/45#discussion_r26057978"},"pull_request":{"href":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/45","id":30781331,"html_url":"https://github.com/reliefweb/rw-widget.js/pull/45","diff_url":"https://github.com/reliefweb/rw-widget.js/pull/45.diff","patch_url":"https://github.com/reliefweb/rw-widget.js/pull/45.patch","issue_url":"https://api.github.com/repos/reliefweb/rw-widget.js/issues/45","number":45,"state":"open","locked":false,"title":"UNRW-676: Verify what filters are expected for river re-re-imagined widget","user":{"login":"fillerwriter","id":254626,"avatar_url":"https://avatars.githubusercontent.com/u/254626?v=3","gravatar_id":"","url":"https://api.github.com/users/fillerwriter","html_url":"https://github.com/fillerwriter","followers_url":"https://api.github.com/users/fillerwriter/followers","following_url":"https://api.github.com/users/fillerwriter/following{/other_user}","gists_url":"https://api.github.com/users/fillerwriter/gists{/gist_id}","starred_url":"https://api.github.com/users/fillerwriter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fillerwriter/subscriptions","organizations_url":"https://api.github.com/users/fillerwriter/orgs","repos_url":"https://api.github.com/users/fillerwriter/repos","events_url":"https://api.github.com/users/fillerwriter/events{/privacy}","received_events_url":"https://api.github.com/users/fillerwriter/received_events","type":"User","site_admin":false},"body":"https://jira.phase2technology.com/browse/UNRW-676\r\n\r\n","created_at":"2015-03-09T17:23:34Z","updated_at":"2015-03-09T17:46:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07e3857f30ff793b5a95c5ff1812b6d7bac9b57f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/45/commits","review_comments_url":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/45/comments","review_comment_url":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reliefweb/rw-widget.js/issues/45/comments","statuses_url":"https://api.github.com/repos/reliefweb/rw-widget.js/statuses/23fc80b9ef0938ca4b25e7e4e5a5fdb78e497f34","head":{"label":"reliefweb:feature/UNRW-676","ref":"feature/UNRW-676","sha":"23fc80b9ef0938ca4b25e7e4e5a5fdb78e497f34","user":{"login":"reliefweb","id":751942,"avatar_url":"https://avatars.githubusercontent.com/u/751942?v=3","gravatar_id":"","url":"https://api.github.com/users/reliefweb","html_url":"https://github.com/reliefweb","followers_url":"https://api.github.com/users/reliefweb/followers","following_url":"https://api.github.com/users/reliefweb/following{/other_user}","gists_url":"https://api.github.com/users/reliefweb/gists{/gist_id}","starred_url":"https://api.github.com/users/reliefweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reliefweb/subscriptions","organizations_url":"https://api.github.com/users/reliefweb/orgs","repos_url":"https://api.github.com/users/reliefweb/repos","events_url":"https://api.github.com/users/reliefweb/events{/privacy}","received_events_url":"https://api.github.com/users/reliefweb/received_events","type":"Organization","site_admin":false},"repo":{"id":27847174,"name":"rw-widget.js","full_name":"reliefweb/rw-widget.js","owner":{"login":"reliefweb","id":751942,"avatar_url":"https://avatars.githubusercontent.com/u/751942?v=3","gravatar_id":"","url":"https://api.github.com/users/reliefweb","html_url":"https://github.com/reliefweb","followers_url":"https://api.github.com/users/reliefweb/followers","following_url":"https://api.github.com/users/reliefweb/following{/other_user}","gists_url":"https://api.github.com/users/reliefweb/gists{/gist_id}","starred_url":"https://api.github.com/users/reliefweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reliefweb/subscriptions","organizations_url":"https://api.github.com/users/reliefweb/orgs","repos_url":"https://api.github.com/users/reliefweb/repos","events_url":"https://api.github.com/users/reliefweb/events{/privacy}","received_events_url":"https://api.github.com/users/reliefweb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reliefweb/rw-widget.js","description":"Library of widgets to be powered by the ReliefWeb API","fork":false,"url":"https://api.github.com/repos/reliefweb/rw-widget.js","forks_url":"https://api.github.com/repos/reliefweb/rw-widget.js/forks","keys_url":"https://api.github.com/repos/reliefweb/rw-widget.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reliefweb/rw-widget.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reliefweb/rw-widget.js/teams","hooks_url":"https://api.github.com/repos/reliefweb/rw-widget.js/hooks","issue_events_url":"https://api.github.com/repos/reliefweb/rw-widget.js/issues/events{/number}","events_url":"https://api.github.com/repos/reliefweb/rw-widget.js/events","assignees_url":"https://api.github.com/repos/reliefweb/rw-widget.js/assignees{/user}","branches_url":"https://api.github.com/repos/reliefweb/rw-widget.js/branches{/branch}","tags_url":"https://api.github.com/repos/reliefweb/rw-widget.js/tags","blobs_url":"https://api.github.com/repos/reliefweb/rw-widget.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reliefweb/rw-widget.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reliefweb/rw-widget.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/reliefweb/rw-widget.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reliefweb/rw-widget.js/statuses/{sha}","languages_url":"https://api.github.com/repos/reliefweb/rw-widget.js/languages","stargazers_url":"https://api.github.com/repos/reliefweb/rw-widget.js/stargazers","contributors_url":"https://api.github.com/repos/reliefweb/rw-widget.js/contributors","subscribers_url":"https://api.github.com/repos/reliefweb/rw-widget.js/subscribers","subscription_url":"https://api.github.com/repos/reliefweb/rw-widget.js/subscription","commits_url":"https://api.github.com/repos/reliefweb/rw-widget.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/reliefweb/rw-widget.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/reliefweb/rw-widget.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/reliefweb/rw-widget.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/reliefweb/rw-widget.js/contents/{+path}","compare_url":"https://api.github.com/repos/reliefweb/rw-widget.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reliefweb/rw-widget.js/merges","archive_url":"https://api.github.com/repos/reliefweb/rw-widget.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reliefweb/rw-widget.js/downloads","issues_url":"https://api.github.com/repos/reliefweb/rw-widget.js/issues{/number}","pulls_url":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls{/number}","milestones_url":"https://api.github.com/repos/reliefweb/rw-widget.js/milestones{/number}","notifications_url":"https://api.github.com/repos/reliefweb/rw-widget.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reliefweb/rw-widget.js/labels{/name}","releases_url":"https://api.github.com/repos/reliefweb/rw-widget.js/releases{/id}","created_at":"2014-12-11T00:49:03Z","updated_at":"2015-03-06T21:14:08Z","pushed_at":"2015-03-09T17:27:11Z","git_url":"git://github.com/reliefweb/rw-widget.js.git","ssh_url":"git@github.com:reliefweb/rw-widget.js.git","clone_url":"https://github.com/reliefweb/rw-widget.js.git","svn_url":"https://github.com/reliefweb/rw-widget.js","homepage":null,"size":3136,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"reliefweb:master","ref":"master","sha":"97b5e23646aa699f91c1491a531fdcc8b871a702","user":{"login":"reliefweb","id":751942,"avatar_url":"https://avatars.githubusercontent.com/u/751942?v=3","gravatar_id":"","url":"https://api.github.com/users/reliefweb","html_url":"https://github.com/reliefweb","followers_url":"https://api.github.com/users/reliefweb/followers","following_url":"https://api.github.com/users/reliefweb/following{/other_user}","gists_url":"https://api.github.com/users/reliefweb/gists{/gist_id}","starred_url":"https://api.github.com/users/reliefweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reliefweb/subscriptions","organizations_url":"https://api.github.com/users/reliefweb/orgs","repos_url":"https://api.github.com/users/reliefweb/repos","events_url":"https://api.github.com/users/reliefweb/events{/privacy}","received_events_url":"https://api.github.com/users/reliefweb/received_events","type":"Organization","site_admin":false},"repo":{"id":27847174,"name":"rw-widget.js","full_name":"reliefweb/rw-widget.js","owner":{"login":"reliefweb","id":751942,"avatar_url":"https://avatars.githubusercontent.com/u/751942?v=3","gravatar_id":"","url":"https://api.github.com/users/reliefweb","html_url":"https://github.com/reliefweb","followers_url":"https://api.github.com/users/reliefweb/followers","following_url":"https://api.github.com/users/reliefweb/following{/other_user}","gists_url":"https://api.github.com/users/reliefweb/gists{/gist_id}","starred_url":"https://api.github.com/users/reliefweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reliefweb/subscriptions","organizations_url":"https://api.github.com/users/reliefweb/orgs","repos_url":"https://api.github.com/users/reliefweb/repos","events_url":"https://api.github.com/users/reliefweb/events{/privacy}","received_events_url":"https://api.github.com/users/reliefweb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reliefweb/rw-widget.js","description":"Library of widgets to be powered by the ReliefWeb API","fork":false,"url":"https://api.github.com/repos/reliefweb/rw-widget.js","forks_url":"https://api.github.com/repos/reliefweb/rw-widget.js/forks","keys_url":"https://api.github.com/repos/reliefweb/rw-widget.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reliefweb/rw-widget.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reliefweb/rw-widget.js/teams","hooks_url":"https://api.github.com/repos/reliefweb/rw-widget.js/hooks","issue_events_url":"https://api.github.com/repos/reliefweb/rw-widget.js/issues/events{/number}","events_url":"https://api.github.com/repos/reliefweb/rw-widget.js/events","assignees_url":"https://api.github.com/repos/reliefweb/rw-widget.js/assignees{/user}","branches_url":"https://api.github.com/repos/reliefweb/rw-widget.js/branches{/branch}","tags_url":"https://api.github.com/repos/reliefweb/rw-widget.js/tags","blobs_url":"https://api.github.com/repos/reliefweb/rw-widget.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reliefweb/rw-widget.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reliefweb/rw-widget.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/reliefweb/rw-widget.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reliefweb/rw-widget.js/statuses/{sha}","languages_url":"https://api.github.com/repos/reliefweb/rw-widget.js/languages","stargazers_url":"https://api.github.com/repos/reliefweb/rw-widget.js/stargazers","contributors_url":"https://api.github.com/repos/reliefweb/rw-widget.js/contributors","subscribers_url":"https://api.github.com/repos/reliefweb/rw-widget.js/subscribers","subscription_url":"https://api.github.com/repos/reliefweb/rw-widget.js/subscription","commits_url":"https://api.github.com/repos/reliefweb/rw-widget.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/reliefweb/rw-widget.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/reliefweb/rw-widget.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/reliefweb/rw-widget.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/reliefweb/rw-widget.js/contents/{+path}","compare_url":"https://api.github.com/repos/reliefweb/rw-widget.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reliefweb/rw-widget.js/merges","archive_url":"https://api.github.com/repos/reliefweb/rw-widget.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reliefweb/rw-widget.js/downloads","issues_url":"https://api.github.com/repos/reliefweb/rw-widget.js/issues{/number}","pulls_url":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls{/number}","milestones_url":"https://api.github.com/repos/reliefweb/rw-widget.js/milestones{/number}","notifications_url":"https://api.github.com/repos/reliefweb/rw-widget.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reliefweb/rw-widget.js/labels{/name}","releases_url":"https://api.github.com/repos/reliefweb/rw-widget.js/releases{/id}","created_at":"2014-12-11T00:49:03Z","updated_at":"2015-03-06T21:14:08Z","pushed_at":"2015-03-09T17:27:11Z","git_url":"git://github.com/reliefweb/rw-widget.js.git","ssh_url":"git@github.com:reliefweb/rw-widget.js.git","clone_url":"https://github.com/reliefweb/rw-widget.js.git","svn_url":"https://github.com/reliefweb/rw-widget.js","homepage":null,"size":3136,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/45"},"html":{"href":"https://github.com/reliefweb/rw-widget.js/pull/45"},"issue":{"href":"https://api.github.com/repos/reliefweb/rw-widget.js/issues/45"},"comments":{"href":"https://api.github.com/repos/reliefweb/rw-widget.js/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reliefweb/rw-widget.js/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/reliefweb/rw-widget.js/statuses/23fc80b9ef0938ca4b25e7e4e5a5fdb78e497f34"}}}}