{"action":"created","comment":{"url":"https://api.github.com/repos/ultrabug/py3status/pulls/comments/100972693","pull_request_review_id":21689493,"id":100972693,"diff_hunk":"@@ -0,0 +1,175 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"\n+Air quality plugin\n+\n+Plugin show data fetched form aqicn.org public API\n+\n+Configuration parameters:\n+    cache_timeout: timeout for refresh data from api (default 900)\n+    city: city or id of city\n+        for search for Your city use curl, for example (sarching for stations in Kraków):\n+        `curl http://api.waqi.info/search/?token=YOUR_TOKEN&keyword=kraków`\n+        best option is choice uid instead city name: city = '@8691'\n+        (default 'shanghai')\n+    format: format string used for text in bar (default 'aqicn: {aqicn}')\n+    good: (default 'Good')\n+    hazardous: (default 'Hazardous')\n+    moderate: (default 'Moderate')\n+    token: token from http://aqicn.org (default 'demo')\n+    unhealty: (default 'Unhealty')\n+    unhealty_sensitive: (default 'Kinda Unhealty')\n+    unknown: (default 'Unknown')\n+    very_unhealty: (default 'Very Unhealthy')\n+\n+Format placeholders:\n+    {aqicn} air quality (text, configurable by options)\n+    {aqi} air quality\n+    {pm25} paramers from `iaqi` array\n+\n+Color options:\n+    color_good: for good aqi\n+    color_hazardous: for hazardous aqi\n+    color_moderate: for moderate aqi\n+    color_unhealty: for unhealty aqi\n+    color_unhealty_sensitive: for unhealty for sensitive persons aqi\n+    color_unknown: for unknow\n+    color_very_unhealty: for very uhealty\n+\n+Example:\n+\n+```\n+aqicn {\n+    token = 'demo'\n+    city = 'shanghai'\n+\n+    format = 'shanghai: {aqicn}'\n+\n+    color_good = '#009966'\n+    color_hazardous = '#7E0023'\n+    color_moderate = '#FFDE33'\n+    color_unhealty = '#CC0033'\n+    color_unhealty_sensitive = '#FF9933'\n+    color_unknown = '#FFFFFF'\n+    color_very_unhealty = '#660099'\n+}\n+```\n+\n+@author beetleman\n+@license BSD\n+\"\"\"\n+\n+try:\n+    # python 3\n+    from urllib.error import URLError\n+    from urllib.request import urlopen, Request\n+    from urllib.parse import urlencode\n+except ImportError:\n+    # python 2\n+    from utllib2 import urlencode","path":"py3status/modules/aqicn.py","position":null,"original_position":68,"commit_id":"81d5a4474db90d1319a918cfaf1b0e0c62e08bb4","original_commit_id":"c83e5416a15b1a66cef529ab8c406022e8237e34","user":{"login":"beetleman","id":4959477,"avatar_url":"https://avatars.githubusercontent.com/u/4959477?v=3","gravatar_id":"","url":"https://api.github.com/users/beetleman","html_url":"https://github.com/beetleman","followers_url":"https://api.github.com/users/beetleman/followers","following_url":"https://api.github.com/users/beetleman/following{/other_user}","gists_url":"https://api.github.com/users/beetleman/gists{/gist_id}","starred_url":"https://api.github.com/users/beetleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beetleman/subscriptions","organizations_url":"https://api.github.com/users/beetleman/orgs","repos_url":"https://api.github.com/users/beetleman/repos","events_url":"https://api.github.com/users/beetleman/events{/privacy}","received_events_url":"https://api.github.com/users/beetleman/received_events","type":"User","site_admin":false},"body":"`from urllib import urlencode` :smile_cat:. Python2 is Messy.","created_at":"2017-02-14T07:28:00Z","updated_at":"2017-02-14T07:28:00Z","html_url":"https://github.com/ultrabug/py3status/pull/746#discussion_r100972693","pull_request_url":"https://api.github.com/repos/ultrabug/py3status/pulls/746","_links":{"self":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/comments/100972693"},"html":{"href":"https://github.com/ultrabug/py3status/pull/746#discussion_r100972693"},"pull_request":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/746"}}},"pull_request":{"url":"https://api.github.com/repos/ultrabug/py3status/pulls/746","id":106007325,"html_url":"https://github.com/ultrabug/py3status/pull/746","diff_url":"https://github.com/ultrabug/py3status/pull/746.diff","patch_url":"https://github.com/ultrabug/py3status/pull/746.patch","issue_url":"https://api.github.com/repos/ultrabug/py3status/issues/746","number":746,"state":"open","locked":false,"title":"http://aqicn.org","user":{"login":"beetleman","id":4959477,"avatar_url":"https://avatars.githubusercontent.com/u/4959477?v=3","gravatar_id":"","url":"https://api.github.com/users/beetleman","html_url":"https://github.com/beetleman","followers_url":"https://api.github.com/users/beetleman/followers","following_url":"https://api.github.com/users/beetleman/following{/other_user}","gists_url":"https://api.github.com/users/beetleman/gists{/gist_id}","starred_url":"https://api.github.com/users/beetleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beetleman/subscriptions","organizations_url":"https://api.github.com/users/beetleman/orgs","repos_url":"https://api.github.com/users/beetleman/repos","events_url":"https://api.github.com/users/beetleman/events{/privacy}","received_events_url":"https://api.github.com/users/beetleman/received_events","type":"User","site_admin":false},"body":"Air quality plugin. Its use api from http://aqicn.org.","created_at":"2017-02-14T00:06:59Z","updated_at":"2017-02-14T07:28:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6b75fa8b5f69c0809f53e08634d584216821bdc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ultrabug/py3status/pulls/746/commits","review_comments_url":"https://api.github.com/repos/ultrabug/py3status/pulls/746/comments","review_comment_url":"https://api.github.com/repos/ultrabug/py3status/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ultrabug/py3status/issues/746/comments","statuses_url":"https://api.github.com/repos/ultrabug/py3status/statuses/81d5a4474db90d1319a918cfaf1b0e0c62e08bb4","head":{"label":"beetleman:aqicn","ref":"aqicn","sha":"81d5a4474db90d1319a918cfaf1b0e0c62e08bb4","user":{"login":"beetleman","id":4959477,"avatar_url":"https://avatars.githubusercontent.com/u/4959477?v=3","gravatar_id":"","url":"https://api.github.com/users/beetleman","html_url":"https://github.com/beetleman","followers_url":"https://api.github.com/users/beetleman/followers","following_url":"https://api.github.com/users/beetleman/following{/other_user}","gists_url":"https://api.github.com/users/beetleman/gists{/gist_id}","starred_url":"https://api.github.com/users/beetleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beetleman/subscriptions","organizations_url":"https://api.github.com/users/beetleman/orgs","repos_url":"https://api.github.com/users/beetleman/repos","events_url":"https://api.github.com/users/beetleman/events{/privacy}","received_events_url":"https://api.github.com/users/beetleman/received_events","type":"User","site_admin":false},"repo":{"id":81763999,"name":"py3status","full_name":"beetleman/py3status","owner":{"login":"beetleman","id":4959477,"avatar_url":"https://avatars.githubusercontent.com/u/4959477?v=3","gravatar_id":"","url":"https://api.github.com/users/beetleman","html_url":"https://github.com/beetleman","followers_url":"https://api.github.com/users/beetleman/followers","following_url":"https://api.github.com/users/beetleman/following{/other_user}","gists_url":"https://api.github.com/users/beetleman/gists{/gist_id}","starred_url":"https://api.github.com/users/beetleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beetleman/subscriptions","organizations_url":"https://api.github.com/users/beetleman/orgs","repos_url":"https://api.github.com/users/beetleman/repos","events_url":"https://api.github.com/users/beetleman/events{/privacy}","received_events_url":"https://api.github.com/users/beetleman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/beetleman/py3status","description":"py3status is an extensible i3status wrapper written in python","fork":true,"url":"https://api.github.com/repos/beetleman/py3status","forks_url":"https://api.github.com/repos/beetleman/py3status/forks","keys_url":"https://api.github.com/repos/beetleman/py3status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/beetleman/py3status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/beetleman/py3status/teams","hooks_url":"https://api.github.com/repos/beetleman/py3status/hooks","issue_events_url":"https://api.github.com/repos/beetleman/py3status/issues/events{/number}","events_url":"https://api.github.com/repos/beetleman/py3status/events","assignees_url":"https://api.github.com/repos/beetleman/py3status/assignees{/user}","branches_url":"https://api.github.com/repos/beetleman/py3status/branches{/branch}","tags_url":"https://api.github.com/repos/beetleman/py3status/tags","blobs_url":"https://api.github.com/repos/beetleman/py3status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/beetleman/py3status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/beetleman/py3status/git/refs{/sha}","trees_url":"https://api.github.com/repos/beetleman/py3status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/beetleman/py3status/statuses/{sha}","languages_url":"https://api.github.com/repos/beetleman/py3status/languages","stargazers_url":"https://api.github.com/repos/beetleman/py3status/stargazers","contributors_url":"https://api.github.com/repos/beetleman/py3status/contributors","subscribers_url":"https://api.github.com/repos/beetleman/py3status/subscribers","subscription_url":"https://api.github.com/repos/beetleman/py3status/subscription","commits_url":"https://api.github.com/repos/beetleman/py3status/commits{/sha}","git_commits_url":"https://api.github.com/repos/beetleman/py3status/git/commits{/sha}","comments_url":"https://api.github.com/repos/beetleman/py3status/comments{/number}","issue_comment_url":"https://api.github.com/repos/beetleman/py3status/issues/comments{/number}","contents_url":"https://api.github.com/repos/beetleman/py3status/contents/{+path}","compare_url":"https://api.github.com/repos/beetleman/py3status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/beetleman/py3status/merges","archive_url":"https://api.github.com/repos/beetleman/py3status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/beetleman/py3status/downloads","issues_url":"https://api.github.com/repos/beetleman/py3status/issues{/number}","pulls_url":"https://api.github.com/repos/beetleman/py3status/pulls{/number}","milestones_url":"https://api.github.com/repos/beetleman/py3status/milestones{/number}","notifications_url":"https://api.github.com/repos/beetleman/py3status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/beetleman/py3status/labels{/name}","releases_url":"https://api.github.com/repos/beetleman/py3status/releases{/id}","deployments_url":"https://api.github.com/repos/beetleman/py3status/deployments","created_at":"2017-02-12T22:54:15Z","updated_at":"2017-02-12T22:54:17Z","pushed_at":"2017-02-14T07:20:35Z","git_url":"git://github.com/beetleman/py3status.git","ssh_url":"git@github.com:beetleman/py3status.git","clone_url":"https://github.com/beetleman/py3status.git","svn_url":"https://github.com/beetleman/py3status","homepage":"","size":2464,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ultrabug:master","ref":"master","sha":"d618af4e0a3dfc364d36228f39eac48e580acb62","user":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"repo":{"id":8292338,"name":"py3status","full_name":"ultrabug/py3status","owner":{"login":"ultrabug","id":474389,"avatar_url":"https://avatars.githubusercontent.com/u/474389?v=3","gravatar_id":"","url":"https://api.github.com/users/ultrabug","html_url":"https://github.com/ultrabug","followers_url":"https://api.github.com/users/ultrabug/followers","following_url":"https://api.github.com/users/ultrabug/following{/other_user}","gists_url":"https://api.github.com/users/ultrabug/gists{/gist_id}","starred_url":"https://api.github.com/users/ultrabug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ultrabug/subscriptions","organizations_url":"https://api.github.com/users/ultrabug/orgs","repos_url":"https://api.github.com/users/ultrabug/repos","events_url":"https://api.github.com/users/ultrabug/events{/privacy}","received_events_url":"https://api.github.com/users/ultrabug/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ultrabug/py3status","description":"py3status is an extensible i3status wrapper written in python","fork":false,"url":"https://api.github.com/repos/ultrabug/py3status","forks_url":"https://api.github.com/repos/ultrabug/py3status/forks","keys_url":"https://api.github.com/repos/ultrabug/py3status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ultrabug/py3status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ultrabug/py3status/teams","hooks_url":"https://api.github.com/repos/ultrabug/py3status/hooks","issue_events_url":"https://api.github.com/repos/ultrabug/py3status/issues/events{/number}","events_url":"https://api.github.com/repos/ultrabug/py3status/events","assignees_url":"https://api.github.com/repos/ultrabug/py3status/assignees{/user}","branches_url":"https://api.github.com/repos/ultrabug/py3status/branches{/branch}","tags_url":"https://api.github.com/repos/ultrabug/py3status/tags","blobs_url":"https://api.github.com/repos/ultrabug/py3status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ultrabug/py3status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ultrabug/py3status/git/refs{/sha}","trees_url":"https://api.github.com/repos/ultrabug/py3status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ultrabug/py3status/statuses/{sha}","languages_url":"https://api.github.com/repos/ultrabug/py3status/languages","stargazers_url":"https://api.github.com/repos/ultrabug/py3status/stargazers","contributors_url":"https://api.github.com/repos/ultrabug/py3status/contributors","subscribers_url":"https://api.github.com/repos/ultrabug/py3status/subscribers","subscription_url":"https://api.github.com/repos/ultrabug/py3status/subscription","commits_url":"https://api.github.com/repos/ultrabug/py3status/commits{/sha}","git_commits_url":"https://api.github.com/repos/ultrabug/py3status/git/commits{/sha}","comments_url":"https://api.github.com/repos/ultrabug/py3status/comments{/number}","issue_comment_url":"https://api.github.com/repos/ultrabug/py3status/issues/comments{/number}","contents_url":"https://api.github.com/repos/ultrabug/py3status/contents/{+path}","compare_url":"https://api.github.com/repos/ultrabug/py3status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ultrabug/py3status/merges","archive_url":"https://api.github.com/repos/ultrabug/py3status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ultrabug/py3status/downloads","issues_url":"https://api.github.com/repos/ultrabug/py3status/issues{/number}","pulls_url":"https://api.github.com/repos/ultrabug/py3status/pulls{/number}","milestones_url":"https://api.github.com/repos/ultrabug/py3status/milestones{/number}","notifications_url":"https://api.github.com/repos/ultrabug/py3status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ultrabug/py3status/labels{/name}","releases_url":"https://api.github.com/repos/ultrabug/py3status/releases{/id}","deployments_url":"https://api.github.com/repos/ultrabug/py3status/deployments","created_at":"2013-02-19T14:59:13Z","updated_at":"2017-02-14T00:08:25Z","pushed_at":"2017-02-14T07:20:36Z","git_url":"git://github.com/ultrabug/py3status.git","ssh_url":"git@github.com:ultrabug/py3status.git","clone_url":"https://github.com/ultrabug/py3status.git","svn_url":"https://github.com/ultrabug/py3status","homepage":"","size":2456,"stargazers_count":367,"watchers_count":367,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":135,"mirror_url":null,"open_issues_count":65,"forks":135,"open_issues":65,"watchers":367,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/746"},"html":{"href":"https://github.com/ultrabug/py3status/pull/746"},"issue":{"href":"https://api.github.com/repos/ultrabug/py3status/issues/746"},"comments":{"href":"https://api.github.com/repos/ultrabug/py3status/issues/746/comments"},"review_comments":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/746/comments"},"review_comment":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ultrabug/py3status/pulls/746/commits"},"statuses":{"href":"https://api.github.com/repos/ultrabug/py3status/statuses/81d5a4474db90d1319a918cfaf1b0e0c62e08bb4"}}}}
{"actor":{"display_login":"beetleman"}}