{"id":21292022,"url":"https://github.com/johnnythetank/aping-plugin-openweathermap","last_synced_at":"2026-05-03T05:31:30.782Z","repository":{"id":57156843,"uuid":"47895348","full_name":"JohnnyTheTank/apiNG-plugin-openweathermap","owner":"JohnnyTheTank","description":"OpenWeatherMap Plugin for apiNG","archived":false,"fork":false,"pushed_at":"2016-09-26T10:07:05.000Z","size":31,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T16:13:42.031Z","etag":null,"topics":["angular","api","aping","aping-plugin","openweathermap","openweathermap-api","owm","weather","weather-api"],"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/JohnnyTheTank.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}},"created_at":"2015-12-12T21:32:27.000Z","updated_at":"2019-11-30T01:10:25.000Z","dependencies_parsed_at":"2022-09-03T06:21:49.387Z","dependency_job_id":null,"html_url":"https://github.com/JohnnyTheTank/apiNG-plugin-openweathermap","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-openweathermap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-openweathermap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-openweathermap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnnyTheTank%2FapiNG-plugin-openweathermap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnnyTheTank","download_url":"https://codeload.github.com/JohnnyTheTank/apiNG-plugin-openweathermap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243762228,"owners_count":20343972,"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":["angular","api","aping","aping-plugin","openweathermap","openweathermap-api","owm","weather","weather-api"],"created_at":"2024-11-21T13:47:14.230Z","updated_at":"2026-05-03T05:31:30.737Z","avatar_url":"https://github.com/JohnnyTheTank.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[logo]: http://aping.io/logo/320/aping-plugin.png \"apiNG Plugin\"\n![apiNG][logo]\n\n[![Join the chat at https://gitter.im/JohnnyTheTank/apiNG](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/JohnnyTheTank/apiNG?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![npm version](https://badge.fury.io/js/aping-plugin-openweathermap.svg)](https://badge.fury.io/js/aping-plugin-openweathermap)\n[![Bower version](https://badge.fury.io/bo/apiNG-plugin-openweathermap.svg)](https://badge.fury.io/bo/apiNG-plugin-openweathermap)\n\n**_apiNG-plugin-openweathermap_** is a [OpenWeatherMap API](http://openweathermap.org/api) plugin for [**apiNG**](https://github.com/JohnnyTheTank/apiNG).\n\n# Information\n* **Supported apiNG models: `weather`**\n* This plugin supports the [`get-native-data` parameter](https://aping.readme.io/docs/advanced#parameters)\n* This plugin needs an [api key](#2-api-key) :warning:\n* Used promise library: [angular-openweathermap-api-factory](https://github.com/JohnnyTheTank/angular-openweathermap-api-factory) _(included in distribution files)_\n\n# Documentation\n\n1. [INSTALLATION](#1-installation)\n    1. Get file\n    2. Include file\n    3. Add dependency\n    4. Add plugin\n2. [API KEY](#2-api-key)\n    1. Generate your `api_key`\n    2. Insert your `api_key` into `aping-config.js`\n3. [USAGE](#3-usage)\n    1. Models\n    2. Requests\n    3. Rate limit\n\n## 1. INSTALLATION\n\n### I. Get file\nInstall via either [bower](http://bower.io/), [npm](https://www.npmjs.com/), CDN (jsDelivr) or downloaded files:\n\n* `bower install apiNG-plugin-openweathermap --save`\n* `npm install aping-plugin-openweathermap --save`\n* use [CDN file](https://www.jsdelivr.com/projects/aping.plugin-openweathermap)\n* download [apiNG-plugin-openweathermap.zip](https://github.com/JohnnyTheTank/apiNG-plugin-openweathermap/zipball/master)\n\n### II. Include file\nInclude `aping-plugin-openweathermap.min.js` in your apiNG application\n\n```html\n\u003c!-- when using bower --\u003e\n\u003cscript src=\"bower_components/apiNG-plugin-openweathermap/dist/aping-plugin-openweathermap.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using npm --\u003e\n\u003cscript src=\"node_modules/aping-plugin-openweathermap/dist/aping-plugin-openweathermap.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using cdn file --\u003e\n\u003cscript src=\"//cdn.jsdelivr.net/aping.plugin-openweathermap/latest/aping-plugin-openweathermap.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- when using downloaded files --\u003e\n\u003cscript src=\"aping-plugin-openweathermap.min.js\"\u003e\u003c/script\u003e\n```\n\n### III. Add dependency\nAdd the module `jtt_aping_openweathermap` as a dependency to your app module:\n```js\nangular.module('app', ['jtt_aping', 'jtt_aping_openweathermap']);\n```\n\n### IV. Add the plugin\nAdd the plugin's directive `aping-openweathermap=\"[]\"` to your apiNG directive and [configure your requests](#ii-requests)\n```html\n\u003caping\n    template-url=\"templates/weather.html\"\n    model=\"weather\"\n    aping-openweathermap=\"[{'cityName':'munich'}]\u003e\n\u003c/aping\u003e\n```\n\n## 2. API KEY\n\n### I. Get your `api_key`\n\n1. Login on [openweathermap.org](http://openweathermap.org/)\n2. Open [home.openweathermap.org](http://home.openweathermap.org/)\n    * There is your `api_key`\n\n### II. Insert your `api_key` into `aping-config.js`\nCreate and open `js/apiNG/aping-config.js` in your application folder. It should be look like this snippet:\n```js\nangular.module('jtt_aping').config(['$provide', function ($provide) {\n    $provide.value(\"apingDefaultSettings\", {\n        apingApiKeys : {\n            'openweathermap': [\n                {'api_key':'\u003cYOUR_OPENWEATHERMAP_API_KEY\u003e'}\n            ],\n            //...\n        }\n    });\n}]);\n```\n\n:warning: Replace `\u003cYOUR_OPENWEATHERMAP_API_KEY\u003e` with your `api_key`\n\n## 3. USAGE\n\n### I. Models\nSupported apiNG models\n\n|  model   | content |\n|----------|---------|\n| `weather` | **weather data** |\n\n\n### II. Requests\nEvery **apiNG plugin** expects an array of **requests** as html attribute.\n\n\n#### Requests by City name\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`cityName`** | `berlin` |  | You can call by city name | no |\n| **`countryCode`** | `de` |  | ISO 3166 country codes | yes |\n| **`timeSlot`** | `forecast5` | `now` | Valid values: `now` and `forecast5` (5 days forecast) | yes | \n| **`type`** | `like` |  | To set the accuracy level either use the `accurate` or `like` type parameter. `accurate` returns exact match values. `like` returns results by searching for that substring | yes |\n| **`units`** | `imperial` | `metric` | Temperature is available in Fahrenheit, Celsius and Kelvin units. For temperature in Fahrenheit use `imperial`. For temperature in Celsius use `metric`. For temperature in Kelvin use `kelvin` | yes |\n| **`language`** | `ru` | `en`  | English: `en`, Russian: `ru`, Italian: `it`, Spanish: `es` (or `sp`), Ukrainian: `uk` (or `ua`), German: `de`, Portuguese: `pt`, Romanian: `ro`, Polish: `pl`, Finnish: `fi`, Dutch: `nl`, French: `fr`, Bulgarian: `bg`, Swedish: `sv` (or `se`), Chinese Traditional: `zh_tw`, Chinese Simplified: `zh` (or `zh_cn`), Turkish: `tr`, Croatian: `hr`, Catalan: `ca`  | yes |\n\nSample requests:\n* `[{'cityName':'london'}, {'cityName':'ney work city', 'units':'imperial'}]`\n* `[{'cityName':'berlin', 'countryCode':'de', 'language':'de', 'timeSlot':'forecast5'}]`\n\n#### Requests by City ID\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`cityId`** | `2172797` |  | You can call by city ID. API responds with exact result. List of city ID city.list.json.gz can be downloaded [here](http://bulk.openweathermap.org/sample/). | no |\n| **`timeSlot`** | `forecast5` | `now` | Valid values: `now` and `forecast5` (5 days forecast) | yes | \n| **`units`** | `imperial` | `metric` | Temperature is available in Fahrenheit, Celsius and Kelvin units. For temperature in Fahrenheit use `imperial`. For temperature in Celsius use `metric`. For temperature in Kelvin use `kelvin` | yes |\n| **`language`** | `ru` | `en`  | English: `en`, Russian: `ru`, Italian: `it`, Spanish: `es` (or `sp`), Ukrainian: `uk` (or `ua`), German: `de`, Portuguese: `pt`, Romanian: `ro`, Polish: `pl`, Finnish: `fi`, Dutch: `nl`, French: `fr`, Bulgarian: `bg`, Swedish: `sv` (or `se`), Chinese Traditional: `zh_tw`, Chinese Simplified: `zh` (or `zh_cn`), Turkish: `tr`, Croatian: `hr`, Catalan: `ca`  | yes |\n\nSample requests:\n* `[{'cityId':'2172797', 'units':'imperial'}]`\n\n#### Requests by Zip code\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`zip`** | `94040` |  | You can call by zip Code | no |\n| **`countryCode`** | `us` |  | ISO 3166 country codes | no |\n| **`units`** | `imperial` | `metric` | Temperature is available in Fahrenheit, Celsius and Kelvin units. For temperature in Fahrenheit use `imperial`. For temperature in Celsius use `metric`. For temperature in Kelvin use `kelvin` | yes |\n| **`language`** | `ru` | `en`  | English: `en`, Russian: `ru`, Italian: `it`, Spanish: `es` (or `sp`), Ukrainian: `uk` (or `ua`), German: `de`, Portuguese: `pt`, Romanian: `ro`, Polish: `pl`, Finnish: `fi`, Dutch: `nl`, French: `fr`, Bulgarian: `bg`, Swedish: `sv` (or `se`), Chinese Traditional: `zh_tw`, Chinese Simplified: `zh` (or `zh_cn`), Turkish: `tr`, Croatian: `hr`, Catalan: `ca`  | yes |\n\nSample requests:\n* `[{'cityName':'94040', 'countryCode':'us', 'language':'de'}]`\n\n#### Requests by Coordinates\n|  parameter  | sample | default | description | optional |\n|----------|---------|---------|---------|---------|\n| **`lat`** | `-13.163333` |  | latitude of the location of your interest | no |\n| **`lng`** | `-72.545556` |  | longitude of the location of your interest | no |\n| **`timeSlot`** | `forecast5` | `now` | Valid values: `now` and `forecast5` (5 days forecast) | yes | \n| **`units`** | `imperial` | `metric` | Temperature is available in Fahrenheit, Celsius and Kelvin units. For temperature in Fahrenheit use `imperial`. For temperature in Celsius use `metric`. For temperature in Kelvin use `kelvin` | yes |\n| **`language`** | `ru` | `en`  | English: `en`, Russian: `ru`, Italian: `it`, Spanish: `es` (or `sp`), Ukrainian: `uk` (or `ua`), German: `de`, Portuguese: `pt`, Romanian: `ro`, Polish: `pl`, Finnish: `fi`, Dutch: `nl`, French: `fr`, Bulgarian: `bg`, Swedish: `sv` (or `se`), Chinese Traditional: `zh_tw`, Chinese Simplified: `zh` (or `zh_cn`), Turkish: `tr`, Croatian: `hr`, Catalan: `ca`  | yes |\n\nSample requests:\n* `[{'lat':'-13.163333', 'lng':'-72.545556', 'language':'es'}]`\n\n### III. Rate limit\nVisit the official [OpenWeatherMap Price List](http://openweathermap.org/price)\n\n\u003e | Calls per  | Free |\n\u003e |----------|---------|\n| **minute** (no more than) | 60 |\n| **day** (no more than) | 50,000 |\n\n\n# Licence\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Faping-plugin-openweathermap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnnythetank%2Faping-plugin-openweathermap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnythetank%2Faping-plugin-openweathermap/lists"}