{"id":24849194,"url":"https://github.com/sshiiden/apod-viewer","last_synced_at":"2025-03-26T11:25:22.780Z","repository":{"id":242482251,"uuid":"716544785","full_name":"sshiiden/APOD-Viewer","owner":"sshiiden","description":"School project about APIs","archived":false,"fork":false,"pushed_at":"2024-02-01T22:34:55.000Z","size":249,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T12:35:20.911Z","etag":null,"topics":["api","nasa","nasa-api","nasa-apod","school-project"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sshiiden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-09T11:07:58.000Z","updated_at":"2024-06-03T07:06:02.000Z","dependencies_parsed_at":"2024-06-03T10:01:20.184Z","dependency_job_id":null,"html_url":"https://github.com/sshiiden/APOD-Viewer","commit_stats":{"total_commits":75,"total_committers":2,"mean_commits":37.5,"dds":0.07999999999999996,"last_synced_commit":"6a97dfddd5b5e4831527563f4809665a3e0355b6"},"previous_names":["sshiiden/apod-viewer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshiiden%2FAPOD-Viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshiiden%2FAPOD-Viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshiiden%2FAPOD-Viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sshiiden%2FAPOD-Viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sshiiden","download_url":"https://codeload.github.com/sshiiden/APOD-Viewer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245642593,"owners_count":20648880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","nasa","nasa-api","nasa-apod","school-project"],"created_at":"2025-01-31T12:30:11.131Z","updated_at":"2025-03-26T11:25:22.757Z","avatar_url":"https://github.com/sshiiden.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# APOD Viewer\nWeb site that queries data from NASA's [APOD](https://apod.nasa.gov) and visualizes the pictures.\n\n- [Requirements](#requirements)\n- [Usage](#usage)\n  - [Viewer](#viewer)\n  - [XML Gateway](#xml-gateway)\n## Requirements\nAll the required python modules are listed in the `requirements.txt` file\nand can be installed thought pip with the following command:\n``` shell\npip install -r requirements.txt\n```\n## Usage\n### Viewer\nStart the program with `python APOD_viewer.py` in the terminal,\nit will start a development server at http://127.0.0.1:5000.\n\nFor the XML version use `python APOD_viewer_XML.py`,\nthe default server address is http://127.0.0.1:5002, it requires\nthe [XML Gateway](#xml-gateway) to be running.\n\nBy default it will show today's picture with it's date and title at the top\nand the copyright, if present, with an explanation at the bottom.\n\nThe image can be clicked to see an high quality version allowing to\nzoom in and see details thought the browser in-built image viewer.\n\nAt the top of the page a form is present to make a custom query,\u003cbr\u003e\nthe first is a list of query types:\n- **Date**, allows to select a date and query for that\ndate's picture.\n- **Date range**, allows to select a start and an end date to query for\npictures in a range.\n- **Random images**, allows to choose the amount of pictures and query\nfor a list of random pictures.\n\nEach query type will change the rendered fields as needed.\n\nBoth the **Date** date field and the **Date range** start date field\nare limited to start from 16 June 1995 and end with today's date, as\nit is the APOD API allowed range.\u003cbr\u003e\nThe **Date range** end date field is limited to start from the start date\nvalue and end with today's date and will change to the start date value,\nif it's previous to the start date, this is done to avoid invalid\nqueries.\u003cbr\u003e\nThe **Random images** number field is limited to start from 1 and end\nat 100, as it is the APOD API allowed range.\n\nIf the query contains more than one picture, a grid view will be used,\nthis can be seen when using the **Date range** and the\n**Random images** queries.\n\nDespite being the **Astronomy Picture Of the Day** viewer videos can be\nfound in queries which are correctly rendered in the page.\n\nIn the absence of a video or a picture a default image is used:\n\n\u003cimg src=\"static/default.png\" alt=\"default.png\" width=\"256\"\u003e\n\n### XML Gateway\nWeb service that query NASA's APOD and translates the returned\nJSON in XML.\n\nStart the program with `python XML_gateway.py` in the terminal,\nthe default server address is http://127.0.0.1:5001.\n\nThe allowed parameters are:\n- **date**: a date to query for, defaults to today's date.\n- **start_date**: the start of a date range, cannot be used\nwith `date`.\n- **end_date**: end of a date range when used with `start_date`,\ndefaults to today's date, cannot be used with `date`.\n- **count**: an integer from 1 to 100, returns `count` random\nimages, cannot be used with any of the above. \n\nThe date format is `yyyy-mm-dd`.\n\nWhen no parameter are specified, today's date is used.\n\nExample queries:\n- http://127.0.0.1:5001?count=3\n- http://127.0.0.1:5001?date=2020-12-13\n\nOn errors, a message explaining the problem is shown.\u003cbr\u003e\nInvalid example query: http://127.0.0.1:5001?date=2020-23-13\u003cbr\u003e\nResulting error:\n``` xml\n\u003cerror\u003e\n    \u003ccode\u003e400\u003c/code\u003e\n    \u003cmsg\u003etime data '2020-23-13' does not match format '%Y-%m-%d'\u003c/msg\u003e\n\u003c/error\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshiiden%2Fapod-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshiiden%2Fapod-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshiiden%2Fapod-viewer/lists"}