{"action":"created","comment":{"url":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/23802352","id":23802352,"diff_hunk":"@@ -0,0 +1,66 @@\n+#Author: Rishabh Sharma <rishabh.sharma.gunner@gmail.com>\n+#This module was developed under funding provided by \n+#Google Summer of Code 2014\n+\n+import datetime\n+import urlparse\n+\n+from sunpy.net.unifieddownloader.client import GenericClient\n+\n+__all__ = ['LYRAClient']\n+\n+class LYRAClient(GenericClient):\n+    def _get_url_for_timerange(self, timerange, **kwargs):\n+        \"\"\"\n+        Returns list of URLS corresponding to TimeRange.\n+        Parameters\n+\t----------\n+        timerange: TimeRange for which data is to be downloaded.\n+        Returns\n+\t-------\n+\tList of urls\n+        \"\"\"\n+        if not timerange:\n+            return []\n+\n+        days = timerange.get_dates()\n+        urls = []\n+        for day in days:\n+            urls.append(self._get_url_for_date(day, **kwargs))\n+        return urls\n+\n+    def _get_url_for_date(self, date, **kwargs):\n+        \"\"\"\n+        Return URL for corresponding date.\n+\tParameters\n+\t----------\n+\tdate : datetime \n+\n+        Returns\n+\t-------\n+\tstring representing URL\n+\t\"\"\"\n+        if not isinstance(date, datetime.date):\n+            raise ValueError(\"This method requires a date\")\n+        filename = \"lyra_%s000000_lev%d_%s.fits\" % (date.strftime('%Y%m%d-'), 2, 'std')","path":"sunpy/net/unifieddownloader/sources/lyra.py","position":45,"original_position":45,"commit_id":"998d8728c52abe7e49a435f0dc7f20dc528e0e38","original_commit_id":"998d8728c52abe7e49a435f0dc7f20dc528e0e38","user":{"login":"dpshelio","id":963242,"avatar_url":"https://avatars.githubusercontent.com/u/963242?v=3","gravatar_id":"","url":"https://api.github.com/users/dpshelio","html_url":"https://github.com/dpshelio","followers_url":"https://api.github.com/users/dpshelio/followers","following_url":"https://api.github.com/users/dpshelio/following{/other_user}","gists_url":"https://api.github.com/users/dpshelio/gists{/gist_id}","starred_url":"https://api.github.com/users/dpshelio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpshelio/subscriptions","organizations_url":"https://api.github.com/users/dpshelio/orgs","repos_url":"https://api.github.com/users/dpshelio/repos","events_url":"https://api.github.com/users/dpshelio/events{/privacy}","received_events_url":"https://api.github.com/users/dpshelio/received_events","type":"User","site_admin":false},"body":"This should be updated to the new way of formating strings:\r\n```python\r\nfilename = \"lyra_{0:%y%m%s}_lev{1}_{2}.fits\".format(date, '2', 'std')\r\n```","created_at":"2015-01-29T21:04:43Z","updated_at":"2015-01-29T21:04:43Z","html_url":"https://github.com/sunpy/sunpy/pull/1088#discussion_r23802352","pull_request_url":"https://api.github.com/repos/sunpy/sunpy/pulls/1088","_links":{"self":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/23802352"},"html":{"href":"https://github.com/sunpy/sunpy/pull/1088#discussion_r23802352"},"pull_request":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1088"}}},"pull_request":{"url":"https://api.github.com/repos/sunpy/sunpy/pulls/1088","id":17972732,"html_url":"https://github.com/sunpy/sunpy/pull/1088","diff_url":"https://github.com/sunpy/sunpy/pull/1088.diff","patch_url":"https://github.com/sunpy/sunpy/pull/1088.patch","issue_url":"https://api.github.com/repos/sunpy/sunpy/issues/1088","number":1088,"state":"open","locked":false,"title":"Unified Downloader","user":{"login":"gunner272","id":6212807,"avatar_url":"https://avatars.githubusercontent.com/u/6212807?v=3","gravatar_id":"","url":"https://api.github.com/users/gunner272","html_url":"https://github.com/gunner272","followers_url":"https://api.github.com/users/gunner272/followers","following_url":"https://api.github.com/users/gunner272/following{/other_user}","gists_url":"https://api.github.com/users/gunner272/gists{/gist_id}","starred_url":"https://api.github.com/users/gunner272/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunner272/subscriptions","organizations_url":"https://api.github.com/users/gunner272/orgs","repos_url":"https://api.github.com/users/gunner272/repos","events_url":"https://api.github.com/users/gunner272/events{/privacy}","received_events_url":"https://api.github.com/users/gunner272/received_events","type":"User","site_admin":false},"body":"Unified Downloader's primary aim is to remove the downloading of light curve files from the Light Curve module.\r\nThis is done with help of custom clients written for LC sources.In addition VSO module is also made compatible with this. \r\nThe downloader has same query based capability as the vso module.\r\nUnified Downloader has a factory based implementation requiring the client to have validation class method '_can_handle_query'. \r\n\r\nPS: This is not pep8 compliant yet in various parts.I am working on that\r\n\r\n---------------------------------------\r\n\r\nToDo:\r\n\r\n* [x] A Rebase onto master.\r\n* [ ] Testing to make sure that this plays nice with EVE and similar where both the VSO and the specialised client return results.\r\n* [ ] Full, detailed code review.\r\n* [ ] Guide documentation on how this affects Lightcurve.\r\n* [ ] Integration with JSOC. (@Cadair)\r\n* [ ] Try and unify the common attributes of `UnifiedResponse`\r\n* [ ] Test coverage?!\r\n","created_at":"2014-07-03T22:54:37Z","updated_at":"2015-01-29T21:04:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"967bf6175e6b7c41f8b88612263b14a8a2fc690c","assignee":{"login":"Cadair","id":1391051,"avatar_url":"https://avatars.githubusercontent.com/u/1391051?v=3","gravatar_id":"","url":"https://api.github.com/users/Cadair","html_url":"https://github.com/Cadair","followers_url":"https://api.github.com/users/Cadair/followers","following_url":"https://api.github.com/users/Cadair/following{/other_user}","gists_url":"https://api.github.com/users/Cadair/gists{/gist_id}","starred_url":"https://api.github.com/users/Cadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cadair/subscriptions","organizations_url":"https://api.github.com/users/Cadair/orgs","repos_url":"https://api.github.com/users/Cadair/repos","events_url":"https://api.github.com/users/Cadair/events{/privacy}","received_events_url":"https://api.github.com/users/Cadair/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/sunpy/sunpy/milestones/8","labels_url":"https://api.github.com/repos/sunpy/sunpy/milestones/8/labels","id":565074,"number":8,"title":"0.6","description":"see roadmap","creator":{"login":"ehsteve","id":739053,"avatar_url":"https://avatars.githubusercontent.com/u/739053?v=3","gravatar_id":"","url":"https://api.github.com/users/ehsteve","html_url":"https://github.com/ehsteve","followers_url":"https://api.github.com/users/ehsteve/followers","following_url":"https://api.github.com/users/ehsteve/following{/other_user}","gists_url":"https://api.github.com/users/ehsteve/gists{/gist_id}","starred_url":"https://api.github.com/users/ehsteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehsteve/subscriptions","organizations_url":"https://api.github.com/users/ehsteve/orgs","repos_url":"https://api.github.com/users/ehsteve/repos","events_url":"https://api.github.com/users/ehsteve/events{/privacy}","received_events_url":"https://api.github.com/users/ehsteve/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":23,"state":"open","created_at":"2014-02-10T18:20:32Z","updated_at":"2015-01-07T16:06:38Z","due_on":"2014-11-01T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/sunpy/sunpy/pulls/1088/commits","review_comments_url":"https://api.github.com/repos/sunpy/sunpy/pulls/1088/comments","review_comment_url":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sunpy/sunpy/issues/1088/comments","statuses_url":"https://api.github.com/repos/sunpy/sunpy/statuses/998d8728c52abe7e49a435f0dc7f20dc528e0e38","head":{"label":"gunner272:unidown","ref":"unidown","sha":"998d8728c52abe7e49a435f0dc7f20dc528e0e38","user":{"login":"gunner272","id":6212807,"avatar_url":"https://avatars.githubusercontent.com/u/6212807?v=3","gravatar_id":"","url":"https://api.github.com/users/gunner272","html_url":"https://github.com/gunner272","followers_url":"https://api.github.com/users/gunner272/followers","following_url":"https://api.github.com/users/gunner272/following{/other_user}","gists_url":"https://api.github.com/users/gunner272/gists{/gist_id}","starred_url":"https://api.github.com/users/gunner272/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunner272/subscriptions","organizations_url":"https://api.github.com/users/gunner272/orgs","repos_url":"https://api.github.com/users/gunner272/repos","events_url":"https://api.github.com/users/gunner272/events{/privacy}","received_events_url":"https://api.github.com/users/gunner272/received_events","type":"User","site_admin":false},"repo":{"id":17128462,"name":"sunpy","full_name":"gunner272/sunpy","owner":{"login":"gunner272","id":6212807,"avatar_url":"https://avatars.githubusercontent.com/u/6212807?v=3","gravatar_id":"","url":"https://api.github.com/users/gunner272","html_url":"https://github.com/gunner272","followers_url":"https://api.github.com/users/gunner272/followers","following_url":"https://api.github.com/users/gunner272/following{/other_user}","gists_url":"https://api.github.com/users/gunner272/gists{/gist_id}","starred_url":"https://api.github.com/users/gunner272/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunner272/subscriptions","organizations_url":"https://api.github.com/users/gunner272/orgs","repos_url":"https://api.github.com/users/gunner272/repos","events_url":"https://api.github.com/users/gunner272/events{/privacy}","received_events_url":"https://api.github.com/users/gunner272/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gunner272/sunpy","description":"SunPy - Python for solar physics","fork":true,"url":"https://api.github.com/repos/gunner272/sunpy","forks_url":"https://api.github.com/repos/gunner272/sunpy/forks","keys_url":"https://api.github.com/repos/gunner272/sunpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gunner272/sunpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gunner272/sunpy/teams","hooks_url":"https://api.github.com/repos/gunner272/sunpy/hooks","issue_events_url":"https://api.github.com/repos/gunner272/sunpy/issues/events{/number}","events_url":"https://api.github.com/repos/gunner272/sunpy/events","assignees_url":"https://api.github.com/repos/gunner272/sunpy/assignees{/user}","branches_url":"https://api.github.com/repos/gunner272/sunpy/branches{/branch}","tags_url":"https://api.github.com/repos/gunner272/sunpy/tags","blobs_url":"https://api.github.com/repos/gunner272/sunpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gunner272/sunpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gunner272/sunpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/gunner272/sunpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gunner272/sunpy/statuses/{sha}","languages_url":"https://api.github.com/repos/gunner272/sunpy/languages","stargazers_url":"https://api.github.com/repos/gunner272/sunpy/stargazers","contributors_url":"https://api.github.com/repos/gunner272/sunpy/contributors","subscribers_url":"https://api.github.com/repos/gunner272/sunpy/subscribers","subscription_url":"https://api.github.com/repos/gunner272/sunpy/subscription","commits_url":"https://api.github.com/repos/gunner272/sunpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/gunner272/sunpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/gunner272/sunpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/gunner272/sunpy/issues/comments/{number}","contents_url":"https://api.github.com/repos/gunner272/sunpy/contents/{+path}","compare_url":"https://api.github.com/repos/gunner272/sunpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gunner272/sunpy/merges","archive_url":"https://api.github.com/repos/gunner272/sunpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gunner272/sunpy/downloads","issues_url":"https://api.github.com/repos/gunner272/sunpy/issues{/number}","pulls_url":"https://api.github.com/repos/gunner272/sunpy/pulls{/number}","milestones_url":"https://api.github.com/repos/gunner272/sunpy/milestones{/number}","notifications_url":"https://api.github.com/repos/gunner272/sunpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gunner272/sunpy/labels{/name}","releases_url":"https://api.github.com/repos/gunner272/sunpy/releases{/id}","created_at":"2014-02-24T07:23:42Z","updated_at":"2014-12-05T20:41:06Z","pushed_at":"2015-01-08T17:54:47Z","git_url":"git://github.com/gunner272/sunpy.git","ssh_url":"git@github.com:gunner272/sunpy.git","clone_url":"https://github.com/gunner272/sunpy.git","svn_url":"https://github.com/gunner272/sunpy","homepage":"http://www.sunpy.org","size":31246,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"sunpy:master","ref":"master","sha":"d78cd4b8a370cf101bd99bcc645e5d0caec143b2","user":{"login":"sunpy","id":963197,"avatar_url":"https://avatars.githubusercontent.com/u/963197?v=3","gravatar_id":"","url":"https://api.github.com/users/sunpy","html_url":"https://github.com/sunpy","followers_url":"https://api.github.com/users/sunpy/followers","following_url":"https://api.github.com/users/sunpy/following{/other_user}","gists_url":"https://api.github.com/users/sunpy/gists{/gist_id}","starred_url":"https://api.github.com/users/sunpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunpy/subscriptions","organizations_url":"https://api.github.com/users/sunpy/orgs","repos_url":"https://api.github.com/users/sunpy/repos","events_url":"https://api.github.com/users/sunpy/events{/privacy}","received_events_url":"https://api.github.com/users/sunpy/received_events","type":"Organization","site_admin":false},"repo":{"id":2165383,"name":"sunpy","full_name":"sunpy/sunpy","owner":{"login":"sunpy","id":963197,"avatar_url":"https://avatars.githubusercontent.com/u/963197?v=3","gravatar_id":"","url":"https://api.github.com/users/sunpy","html_url":"https://github.com/sunpy","followers_url":"https://api.github.com/users/sunpy/followers","following_url":"https://api.github.com/users/sunpy/following{/other_user}","gists_url":"https://api.github.com/users/sunpy/gists{/gist_id}","starred_url":"https://api.github.com/users/sunpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunpy/subscriptions","organizations_url":"https://api.github.com/users/sunpy/orgs","repos_url":"https://api.github.com/users/sunpy/repos","events_url":"https://api.github.com/users/sunpy/events{/privacy}","received_events_url":"https://api.github.com/users/sunpy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sunpy/sunpy","description":"SunPy - Python for solar physics","fork":false,"url":"https://api.github.com/repos/sunpy/sunpy","forks_url":"https://api.github.com/repos/sunpy/sunpy/forks","keys_url":"https://api.github.com/repos/sunpy/sunpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sunpy/sunpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sunpy/sunpy/teams","hooks_url":"https://api.github.com/repos/sunpy/sunpy/hooks","issue_events_url":"https://api.github.com/repos/sunpy/sunpy/issues/events{/number}","events_url":"https://api.github.com/repos/sunpy/sunpy/events","assignees_url":"https://api.github.com/repos/sunpy/sunpy/assignees{/user}","branches_url":"https://api.github.com/repos/sunpy/sunpy/branches{/branch}","tags_url":"https://api.github.com/repos/sunpy/sunpy/tags","blobs_url":"https://api.github.com/repos/sunpy/sunpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sunpy/sunpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sunpy/sunpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sunpy/sunpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sunpy/sunpy/statuses/{sha}","languages_url":"https://api.github.com/repos/sunpy/sunpy/languages","stargazers_url":"https://api.github.com/repos/sunpy/sunpy/stargazers","contributors_url":"https://api.github.com/repos/sunpy/sunpy/contributors","subscribers_url":"https://api.github.com/repos/sunpy/sunpy/subscribers","subscription_url":"https://api.github.com/repos/sunpy/sunpy/subscription","commits_url":"https://api.github.com/repos/sunpy/sunpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sunpy/sunpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sunpy/sunpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sunpy/sunpy/issues/comments/{number}","contents_url":"https://api.github.com/repos/sunpy/sunpy/contents/{+path}","compare_url":"https://api.github.com/repos/sunpy/sunpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sunpy/sunpy/merges","archive_url":"https://api.github.com/repos/sunpy/sunpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sunpy/sunpy/downloads","issues_url":"https://api.github.com/repos/sunpy/sunpy/issues{/number}","pulls_url":"https://api.github.com/repos/sunpy/sunpy/pulls{/number}","milestones_url":"https://api.github.com/repos/sunpy/sunpy/milestones{/number}","notifications_url":"https://api.github.com/repos/sunpy/sunpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sunpy/sunpy/labels{/name}","releases_url":"https://api.github.com/repos/sunpy/sunpy/releases{/id}","created_at":"2011-08-06T15:34:08Z","updated_at":"2015-01-26T17:14:27Z","pushed_at":"2015-01-28T10:19:42Z","git_url":"git://github.com/sunpy/sunpy.git","ssh_url":"git@github.com:sunpy/sunpy.git","clone_url":"https://github.com/sunpy/sunpy.git","svn_url":"https://github.com/sunpy/sunpy","homepage":"http://www.sunpy.org","size":141784,"stargazers_count":151,"watchers_count":151,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":183,"forks":107,"open_issues":183,"watchers":151,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1088"},"html":{"href":"https://github.com/sunpy/sunpy/pull/1088"},"issue":{"href":"https://api.github.com/repos/sunpy/sunpy/issues/1088"},"comments":{"href":"https://api.github.com/repos/sunpy/sunpy/issues/1088/comments"},"review_comments":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1088/comments"},"review_comment":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1088/commits"},"statuses":{"href":"https://api.github.com/repos/sunpy/sunpy/statuses/998d8728c52abe7e49a435f0dc7f20dc528e0e38"}}}}