{"id":15580968,"url":"https://github.com/sevinf/stargazing-time","last_synced_at":"2025-03-29T08:15:12.734Z","repository":{"id":57369509,"uuid":"77251858","full_name":"SevInf/stargazing-time","owner":"SevInf","description":"Library that tells you the best time for stargazing in the next 5 days","archived":false,"fork":false,"pushed_at":"2016-12-23T22:16:19.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T11:41:06.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SevInf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-23T21:38:36.000Z","updated_at":"2016-12-23T22:31:53.000Z","dependencies_parsed_at":"2022-08-26T06:00:45.736Z","dependency_job_id":null,"html_url":"https://github.com/SevInf/stargazing-time","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevInf%2Fstargazing-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevInf%2Fstargazing-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevInf%2Fstargazing-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevInf%2Fstargazing-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SevInf","download_url":"https://codeload.github.com/SevInf/stargazing-time/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246156416,"owners_count":20732397,"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":[],"created_at":"2024-10-02T19:40:51.328Z","updated_at":"2025-03-29T08:15:12.712Z","avatar_url":"https://github.com/SevInf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stargazing-time\n\n[![Build Status](https://travis-ci.org/SevInf/stargazing-time.svg?branch=master)](https://travis-ci.org/SevInf/stargazing-time)\n[![codecov](https://codecov.io/gh/SevInf/stargazing-time/branch/master/graph/badge.svg)](https://codecov.io/gh/SevInf/stargazing-time)\n\nLibrary that tells you the best time for stargazing in the next 5 days using\n[OpenWeatherMap](http://openweathermap.org).\n\n## Usage\n\nFirst of all, you need to [obtain OpenWeatherMap API\nkey](http://home.openweathermap.org/users/sign_up).\n\nOnce you have it, you can start using the library. You can specify the place you\nwant to query in 3 different ways:\n\n### Using city name + country code\n\n```js\nconst StargazingTime = require('stargazing-time');\nStargazingTime.getGoodTimes({\n        city: 'Berlin,de',\n        apiKey: '\u003cYOUR API KEY\u003e'\n    })\n    .then(results =\u003e console.log(results));\n```\n\n### Using OpenWeatherMap city id\n\n```js\nconst StargazingTime = require('stargazing-time');\nStargazingTime.getGoodTimes({\n        id: 2950159,\n        apiKey: '\u003cYOUR API KEY\u003e'\n    })\n    .then(results =\u003e console.log(results));\n```\n\n[Find out more about city ids](http://openweathermap.org/forecast5#cityid5);\n\n\n### Using coordinates\n\n```js\nconst StargazingTime = require('stargazing-time');\nStargazingTime.getGoodTimes({\n        lat: 52.52436,\n        lon: 13.41053,\n        apiKey: '\u003cYOUR API KEY\u003e'\n    })\n    .then(results =\u003e console.log(results));\n```\n\n## Response format\n\n`getGoodTimes` returns a promise to array of time intervals in the next 5 days,\nwhich can be good for stargazing. Each element of array has the following\nfields:\n\n- `from`: `Date` — beginning time of the interval\n- `to`: `Date` — end time of the interval\n- `forecast` — original weather forecast, as per [OpenWeatherMap JSON API](http://openweathermap.org/forecast5#JSON).\n\nThe time interval considered good if:\n\n1. It is night (doh!) \n2. Cloudiness is less than 30%\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevinf%2Fstargazing-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsevinf%2Fstargazing-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevinf%2Fstargazing-time/lists"}