{"id":20555667,"url":"https://github.com/attogram/weatherbit-api-wrapper","last_synced_at":"2025-04-14T12:44:40.389Z","repository":{"id":62489481,"uuid":"244855065","full_name":"attogram/weatherbit-api-wrapper","owner":"attogram","description":"PHP wrapper for Weatherbit.io API","archived":false,"fork":false,"pushed_at":"2020-03-13T08:34:43.000Z","size":42,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T01:53:34.481Z","etag":null,"topics":["weather-api","weatherbit","weatherbit-api"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/attogram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"attogram","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-03-04T09:10:43.000Z","updated_at":"2023-05-01T11:55:36.000Z","dependencies_parsed_at":"2022-11-02T11:16:08.945Z","dependency_job_id":null,"html_url":"https://github.com/attogram/weatherbit-api-wrapper","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attogram%2Fweatherbit-api-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attogram%2Fweatherbit-api-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attogram%2Fweatherbit-api-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attogram%2Fweatherbit-api-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/attogram","download_url":"https://codeload.github.com/attogram/weatherbit-api-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248883389,"owners_count":21177203,"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":["weather-api","weatherbit","weatherbit-api"],"created_at":"2024-11-16T03:19:47.984Z","updated_at":"2025-04-14T12:44:40.340Z","avatar_url":"https://github.com/attogram.png","language":"PHP","readme":"# weatherbit-api-wrapper\n\nPHP wrapper for Weatherbit.io API\n\n[![Build Status](https://travis-ci.org/attogram/weatherbit-api-wrapper.svg?branch=master)](https://travis-ci.org/attogram/weatherbit-api-wrapper)\n[![Maintainability](https://api.codeclimate.com/v1/badges/46de553afcad6cff3161/maintainability)](https://codeclimate.com/github/attogram/weatherbit-api-wrapper/maintainability)\n[![StyleCI](https://github.styleci.io/repos/244855065/shield?branch=master)](https://github.styleci.io/repos/244855065)\n[![Total Downloads](https://poser.pugx.org/attogram/weatherbit-api-wrapper/downloads)](https://packagist.org/packages/attogram/weatherbit-api-wrapper)\n[![License](https://poser.pugx.org/attogram/weatherbit-api-wrapper/license)](https://packagist.org/packages/attogram/weatherbit-api-wrapper)\n\nVersions:\n[![Latest Stable Version](https://poser.pugx.org/attogram/weatherbit-api-wrapper/v/stable)](https://packagist.org/packages/attogram/weatherbit-api-wrapper)\n[![Latest Unstable Version](https://poser.pugx.org/attogram/weatherbit-api-wrapper/v/unstable)](https://packagist.org/packages/attogram/weatherbit-api-wrapper)\n\n## Install\n\n* `composer require attogram/weatherbit-api-wrapper`\n* Get an API Key from: \u003chttps://www.weatherbit.io/\u003e\n\n## Example Usage\n\n```php\n\u003c?php\nrequire('path/to/vendor/autoload.php');\n\n$weatherbit = new \\Attogram\\Weatherbit\\Weatherbit();\n\ntry {\n    // Always set your API Key\n    $weatherbit-\u003esetKey('YOUR-WEATHERBIT-API-KEY');\n\n    // Set location using one of the setLocationBy*() functions\n    $weatherbit-\u003esetLocationByCity('Amsterdam', 'NL');\n\n    // Gets array of current weather data\n    $currentWeather = $weatherbit-\u003egetCurrent();\n\n} catch (Exception $exception) {\n    exit('Error: ' . $exception-\u003egetMessage());\n}\n\nprint_r($currentWeather);\n```\n\n* see [public/example.php](public/example.php) for an example web form\n\n## Functions\n\n### public function setKey(string $key)\n\n### public function setLanguage(string $languageCode)\n\n### public function setUnits(string $unitsCode)\n\n### public function setLocationByLatitudeLongitude(string $latitude, string $longitude)\n\n### public function setLocationByCityId(string $cityId)\n\n### public function setLocationByPostalCode(string $postalCode)\n\n### public function setLocationByCityIds(array $cityIds)\n\n### public function setLocationByCity(string $city, string $country = '')\n\n### public function setLocationByIp(string $ipAddress = 'auto')\n\n### public function setLocationByStation(string $weatherStation)\n\n### public function setLocationByStations(array $weatherStations)\n\n### public function getDailyForecast($days = 10): array\n\n### public function getCurrent(): array\n\n### public function getUsage(): array\n\n### public function getUrl(): string\n\n## Project Links\n\n* Github: \u003chttps://github.com/attogram/weatherbit-api-wrapper/\u003e\n* Packagist: \u003chttps://packagist.org/packages/attogram/weatherbit-api-wrapper\u003e\n* CodeClimate: \u003chttps://codeclimate.com/github/attogram/weatherbit-api-wrapper\u003e\n* Travis CI: \u003chttps://travis-ci.org/attogram/weatherbit-api-wrapper\u003e\n* Style CI: \u003chttps://github.styleci.io/repos/244855065\u003e\n","funding_links":["https://github.com/sponsors/attogram"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattogram%2Fweatherbit-api-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fattogram%2Fweatherbit-api-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattogram%2Fweatherbit-api-wrapper/lists"}