{"id":15683594,"url":"https://github.com/devorein/weyder-package","last_synced_at":"2025-05-07T14:05:31.193Z","repository":{"id":103488637,"uuid":"200242179","full_name":"Devorein/weyder-package","owner":"Devorein","description":"A basic weather package that utilizes darksky and mapbox api ...","archived":false,"fork":false,"pushed_at":"2019-08-10T10:00:11.000Z","size":255,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-07T14:05:24.640Z","etag":null,"topics":["forecast","weather-api","weather-data","weather-information"],"latest_commit_sha":null,"homepage":"","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/Devorein.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-08-02T13:47:01.000Z","updated_at":"2024-11-23T15:47:47.000Z","dependencies_parsed_at":"2023-03-13T15:08:33.455Z","dependency_job_id":null,"html_url":"https://github.com/Devorein/weyder-package","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":"0.30434782608695654","last_synced_commit":"c682a603a4f282ccd3cd930b8d0dbc63d4ac8994"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fweyder-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fweyder-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fweyder-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devorein%2Fweyder-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devorein","download_url":"https://codeload.github.com/Devorein/weyder-package/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252892503,"owners_count":21820648,"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":["forecast","weather-api","weather-data","weather-information"],"created_at":"2024-10-03T17:07:32.774Z","updated_at":"2025-05-07T14:05:31.168Z","avatar_url":"https://github.com/Devorein.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Weyder\n\n### 1. Installation\n```cmd\nnpm install weyder\n```\n\n### 2. Using weyder\n```js\nconst weyder = require('weyder') // OR\nconst {geoCode,foreCast,setAccessToken,setWeatherDataSpan} = require('weyder');\n```\n#### Exported values overview\n- `geoCode` (location) =\u003e [ latitude,longitude ]\n- `foreCast` ([ latitude,longitude ]) =\u003e weather Information\n- `setAccessToken` (\"mapbox\" || \"darksky\", mapbox_token || darksky_token)\n- `setWeatherDataSpan` ({\"currently\" || \"minutely\" || \"daily\": `boolean`})\n\n#### `setAccessToken`\nThis function is used to set the access token of mapbox and darksky endpoints\n\n**Create a free darksky and mapbox account, copy your own access token and pass the api name and access token to `setAccessToken`** \n```js\nsetAccessToken(\"darksky\",\"your_DarkSky_AccessToken\")\nsetAccessToken(\"mapbox\",\"your_MapBox_AccessToken\")\n``` \n#### `setWeatherDataSpan`\nUse this function and set appropriate time span to get the more information from the api.\n\nObject properties `currently, minutely, hourly, daily`, value `\u003cboolean\u003e`\n```js\nsetWeatherDataSpan({\n    'currently': true,\n    'minutely': false,\n    'daily': true\n})\n\n```\nThe above sets \n-  `currently = true`, \n-  `minutely = false`, \n-  `hourly = false`, \n-  `daily = true`\n\n---\n### 3. Necessary Resources\nNOTE: To undestand what `currently, hourly, daily` holds, visit https://darksky.net/dev/docs#data-point\n\n#### Here's a snapshot of `currently`\n![currently_data](img/currently.png)\n\n#### Here's a snapshot of `hourly`\n![hourly_data](img/hourly.png)\n\n#### Here's a snapshot of `daily`\n![daily_data](img/daily.png)\n\n### 4. Basic Usage\n#### Using the api (async/await style)\n```js\nconst getWeatherData = async (location) =\u003e{\n    const geocode = await geoCode(location)\n    const forecast = await foreCast(geocode)\n    console.log(forecast)\n}\ngetWeatherData(\"Austin\")\n// Output\n// {\n//     currently: [...],\n//     hourly: [...]\n//     daily: [...],\n// }\n```\n#### Using the api (promises style)\n```js\ngeoCode('Austin')\n.then(geocode =\u003e foreCast(geocode))\n.then(forecast =\u003e {\n    console.log(forecast);\n})\n.catch(e=\u003e{\n    console.log(e);\n})\n\n// Output\n// {\n//     currently: [...],\n//     hourly: [...]\n//     daily: [...],\n// }\n```\n\n#### Using the api (callbacks style)\n```js\ngeoCode(\"Austin\",(err,geocode)=\u003e{\n    if(err) return err\n    foreCast(geocode,(err,forecast)=\u003e{\n        if(err) return err\n        console.log(forecast)\n    })\n})\n\n// Output\n// {\n//     currently: [...],\n//     hourly: [...]\n//     daily: [...],\n// }\n```\n\n### 5. Total Usage\n```js\nconst {geoCode,foreCast,setAccessToken,setWeatherDataSpan} = require('weyder');\n\nsetAccessToken(\"darksky\",\"your_DarkSky_AccessToken\")\nsetAccessToken(\"mapbox\",\"your_MapBox_AccessToken\")\n\nsetWeatherDataSpan({\n    'currently': true,\n    'minutely': false,\n    'daily': true\n})\n\ngeoCode('Austin')\n.then(geocode =\u003e foreCast(geocode))\n.then(forecast =\u003e {\n    console.log(forecast);\n})\n.catch(e=\u003e{\n    console.log(e);\n})\n\n// Output\n// {\n//     currently: [...],\n//     hourly: [...]\n//     daily: [...],\n// }\n```\n**TODO**: \n--\n1. Still thinking :^)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevorein%2Fweyder-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevorein%2Fweyder-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevorein%2Fweyder-package/lists"}