{"id":19537780,"url":"https://github.com/rugaard/pollen","last_synced_at":"2025-04-26T15:31:04.242Z","repository":{"id":57047587,"uuid":"199144982","full_name":"rugaard/pollen","owner":"rugaard","description":"🇩🇰🤧 API for retrieving latest pollen measurements from Astma-Allergi Denmark.","archived":false,"fork":false,"pushed_at":"2020-11-14T18:27:17.000Z","size":21,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T14:41:11.591Z","etag":null,"topics":["allergy","api","asthma","astma-allergi","astma-allergi-danmark","astma-allergi-denmark","measurements","pollen","pollen-measurements"],"latest_commit_sha":null,"homepage":"https://github.com/rugaard","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rugaard.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":"2019-07-27T09:36:09.000Z","updated_at":"2022-05-02T06:57:25.000Z","dependencies_parsed_at":"2022-08-23T18:50:57.972Z","dependency_job_id":null,"html_url":"https://github.com/rugaard/pollen","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rugaard%2Fpollen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rugaard%2Fpollen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rugaard%2Fpollen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rugaard%2Fpollen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rugaard","download_url":"https://codeload.github.com/rugaard/pollen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224038684,"owners_count":17245482,"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":["allergy","api","asthma","astma-allergi","astma-allergi-danmark","astma-allergi-denmark","measurements","pollen","pollen-measurements"],"created_at":"2024-11-11T02:29:21.628Z","updated_at":"2024-11-11T02:29:25.072Z","avatar_url":"https://github.com/rugaard.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\u003cimg src=\"https://rugaard.github.io/packages/pollen/logo.jpg\"\u003e\u003c/div\u003e\n\n# 🇩🇰🤧 Pollen measurements from Astma-Allergi Denmark\n\n\u003ca href=\"https://github.com/rugaard/pollen/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/release/rugaard/pollen.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://travis-ci.org/rugaard/pollen\"\u003e\u003cimg src=\"https://travis-ci.org/rugaard/pollen.svg?branch=master\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codeclimate.com/github/rugaard/pollen\"\u003e\u003cimg src=\"https://img.shields.io/codeclimate/coverage/rugaard/pollen.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codeclimate.com/github/rugaard/pollen\"\u003e\u003cimg src=\"https://img.shields.io/codeclimate/maintainability/rugaard/pollen.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://creativecommons.org/licenses/by-nc-nd/4.0/\"\u003e\u003cimg src=\"https://img.shields.io/static/v1.svg?labelColor=5f5f5f\u0026label=license\u0026color=43897a\u0026message=CC%20BY-NC-ND\"\u003e\u003c/a\u003e\n\nAstma-Allergi Denmark does unfortunately not offer an official API for the latest pollen measurements in Denmark.\n\nThis package is (in some form) a workaround for that. It collects the latest measurements from the official Astma-Allergi Denmark website and turns it into structured data objects.\n\nThe returned data shows the measured pollen between **13:00** _(1:00 PM)_ yesterday and **13:00** _(1:00 PM)_ present day. Everyday at **16:00** _(4:00 PM)_ the latest measurements are being published.\n\n## ⚠️ Disclaimer\nSince Astma-Allergi Denmark is an independent union, with a very little government funding, this package is made available under a very strict license, which prohibits any use other than personal.\n\nIf you wish to use the pollen measurements commercially, you should contact Astma-Allergi Denmark directly and support them by buying the data instead. The payment goes directly to the maintenance and further development of their Pollen measurement service.\n\nFor more info about a commercial license, [visit their official website](https://hoefeber.astma-allergi.dk/pollenfeed).\n\n## 📖 Table of contents\n\n* [Installation](#-installation)\n    * [Laravel](#laravel)\n* [Usage](#%EF%B8%8F-usage)\n    * [Pollen Client](#pollen-client)\n    * [Methods](#methods)\n        * [Get measurements](#get-measurements)\n* [Pollen stations](#-pollen-stations)\n* [Frequently Asked Questions (FAQ)](#-frequently-asked-questions-faq)\n    * [What is this `Tightenco\\Collect\\Support\\Collection` class and how does it work?](#what-is-this-tightencocollectsupportcollection-class-and-how-does-it-work)\n* [Donating to Astma-Allergi Denmark](#-donating-to-astma-allergi-denmark)\n* [License](#-license)\n\n## 📦 Installation\nYou can install the package via [Composer](https://getcomposer.org/), by using the following command:\n```shell\ncomposer require rugaard/pollen\n```\n\n### Laravel\nThis package comes with a out-of-the-box Service Provider for the [Laravel](http://laravel.com) framework.\nIf you're using a newer version of Laravel (`\u003e= 5.5`) then the service provider will be loaded automatically.\n\nAre you using an older version, then you need to manually add the service provider to the `config/app.php` file:\n```php\n'providers' =\u003e [\n    Rugaard\\Pollen\\Providers\\Laravel\\ServiceProvider::class,\n]\n```\n\n## ⚙️ Usage\n\nFirst thing you need to do, is to instantiate the `Pollen` client\n```php\n# Instantiate the Pollen client.\n$pollen = new \\Rugaard\\Pollen\\Pollen;\n```\n\nOnce you've done that, you're able to request the latest measurements from one of the [supported pollen stations](#-pollen-stations):\n```php\n# Copenhagen pollen station.\n$measurements = $pollen-\u003eget('copenhagen');\n```\n\n### Pollen client\n\nThe Pollen client which handles the requests to Astma-Allergi Denmark.\n\n```php\nnew Pollen(?Client $httpClient);\n```\n\n| Parameter | Type | Default | Description |\n| :--- | :--- | :---: | :--- |\n| `$httpClient` | `\\GuzzleHttp\\ClientInterface` | `null` | Replace the default underlying HTTP Client |\n\n### Methods\n\n#### Get measurements.\n\nGet latest pollen measurements from a specific pollen station.\n\n```php\nget(string $stationCode);\n```\n\n| Parameter | Type | Description |\n| :--- | :--- | :--- |\n| `$stationCode` | `string` | Code of station. [Supported pollen stations.](#-pollen-stations) |\n\n_**Note**: The returned data shows the measured pollen between 13:00 (1:00 PM) yesterday and 13:00 (1:00 PM) present day. The measurements are updated everyday at 16:00 (4:00 PM)._\n\n## 🏛 Pollen stations\n\nCurrently there only exists two Pollen stations in Denmark. \n\n| ID | Name | Code | Region |\n| :---: | :--- | :--- | :---: |\n| 48 | København | `copenhagen` | East |\n| 49 | Viborg | `viborg` | West |\n\n## 🗣 Frequently Asked Questions (FAQ)\n\n#### What is this `Tightenco\\Collect\\Support\\Collection` class and how does it work?\n\nAll data is returned within a `Tightenco\\Collect\\Support\\Collection` class. The class is a port of the popular `Collection` class from [Laravel](https://laravel.com).\n\nPlease refer to [Laravel](https://laravel.com)'s detailed documentation, to learn more about how you work with a `Collection`:\u003cbr\u003e\n[https://laravel.com/docs/master/collections](https://laravel.com/docs/master/collections)\n\n## 💰 Donating to Astma-Allergi Denmark\n\nTo help Astma-Allergi Denmark maintain and further develop the Pollen measurement service.\u003cbr\u003e\nPlease consider [sending them a donation](https://www.astma-allergi.dk/stoetos).\n\n## 🚓 License\nThis package is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 (CC BY-NC-ND 4.0)](https://creativecommons.org/licenses/by-nc-nd/4.0/).\n\n\u003ca rel=\"license\" href=\"https://creativecommons.org/licenses/by-nc-nd/4.0/\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png\" /\u003e\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frugaard%2Fpollen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frugaard%2Fpollen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frugaard%2Fpollen/lists"}