{"id":15951972,"url":"https://github.com/shchuko/ifmo-weather-rest","last_synced_at":"2025-04-04T07:43:28.588Z","repository":{"id":53052753,"uuid":"353905958","full_name":"shchuko/ifmo-weather-rest","owner":"shchuko","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-08T21:41:20.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-09T18:52:06.255Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shchuko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-02T04:37:55.000Z","updated_at":"2021-04-08T21:41:22.000Z","dependencies_parsed_at":"2022-09-04T09:51:59.677Z","dependency_job_id":null,"html_url":"https://github.com/shchuko/ifmo-weather-rest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchuko%2Fifmo-weather-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchuko%2Fifmo-weather-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchuko%2Fifmo-weather-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shchuko%2Fifmo-weather-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shchuko","download_url":"https://codeload.github.com/shchuko/ifmo-weather-rest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142042,"owners_count":20890652,"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-07T13:05:21.583Z","updated_at":"2025-04-04T07:43:28.569Z","avatar_url":"https://github.com/shchuko.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ifmo-weather-rest\n\nNode.JS Wrapper for OpenWeatherMap API\n\nThe frontend is [here](https://github.com/shchuko/ifmo-weather/tree/fork/my-backend)\n\n## Weather requests endpoints\n\n### `/weather/city` endpoint\n\n#### GET\n\nParams:\n\n- `q` - cityName\n\nExample:\n\n```\n/weather/city?q=Moscow\n```\n\nResponse (200):\n\n```json5\n// Weather information in metric units\n{\n  \"name\": \"Moscow\",\n  \"temperature\": 6,\n  \"iconSrc\": \"http://openweathermap.org/img/wn/10d@2x.png\",\n  \"windSpeed\": 3,\n  \"windDirection\": \"N\",\n  \"cloudiness\": \"Light rain\",\n  \"pressure\": 1004,\n  \"humidity\": 56,\n  \"locationLat\": 55.7522,\n  \"locationLon\": 37.6156\n}\n```\n\nResponse (404): if city can't be found.\n\nResponse (500): on internal error.\n\n### `/weather/coordinates` endpoint\n\n#### GET\n\nParams:\n\n- `lat` - latitude\n\n- `long` - longitude\n\nExample:\n\n```http request\n/weather/coordinates?lat=55.7522\u0026long=37.6156\n```\n\nResponse (200):\n\n```json5\n// Weather information in metric units\n{\n  \"name\": \"Moscow\",\n  \"temperature\": 6,\n  \"iconSrc\": \"http://openweathermap.org/img/wn/10d@2x.png\",\n  \"windSpeed\": 3,\n  \"windDirection\": \"N\",\n  \"cloudiness\": \"Light rain\",\n  \"pressure\": 1005,\n  \"humidity\": 65,\n  \"locationLat\": 55.7482,\n  \"locationLon\": 37.6177\n}\n```\n\nResponse (404): if city can't be found.\n\nResponse (500): on internal error.\n\n\n## Favourites - `/favourites` endpoint\n\n### GET\n\nParams/body: none\n\nExample:\n\n```http request\n/weather/favourites\n```\n\nResponse (200):\n\n```json5\n// Saved favourite cities:\n{\n  \"favouriteCitiesNames\": [\n    \"Sevastopol\",\n    \"Moscow\"\n  ]\n}\n```\n\nResponse (500): on internal error.\n\n### POST\n\nParams:\n\n- `q` - cityName\n\nExample:\n\n```http request\n/favourites?q=Saint Petersburg\n```\n\nResponse (201):\n\n```json5\n{\n  \"name\": \"Saint Petersburg\",\n  \"temperature\": 4,\n  \"iconSrc\": \"http://openweathermap.org/img/wn/04d@2x.png\",\n  \"windSpeed\": 4,\n  \"windDirection\": \"NW\",\n  \"cloudiness\": \"Broken clouds\",\n  \"pressure\": 1006,\n  \"humidity\": 70,\n  \"locationLat\": 59.8944,\n  \"locationLon\": 30.2642\n}\n```\n\nResponse (409): if city already added.\n\nResponse (500): on internal error.\n\n(!) Note that response may return different (corrected) city name. Only corrected city name can be used in DELETE\nrequest.\n\n### DELETE\n\nParams:\n\n- `q` - cityName\n\nExample:\n\n```http request\n/favourites?q=Saint Petersburg\n```\n\nResponse (200): deleted successfully.\n\nResponse (404): if city is not in favourites.\n\nResponse (500): on internal error.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshchuko%2Fifmo-weather-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshchuko%2Fifmo-weather-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshchuko%2Fifmo-weather-rest/lists"}