PHPackages                             richard-parnaby-king/weatherapi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. richard-parnaby-king/weatherapi

ActiveLibrary[API Development](/categories/api)

richard-parnaby-king/weatherapi
===============================

Laravel based API that has endpoints for getting the weather from a weather api, with parameters to select a location.

02PHP

Since Nov 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/richard-parnaby-king/weatherapi)[ Packagist](https://packagist.org/packages/richard-parnaby-king/weatherapi)[ RSS](/packages/richard-parnaby-king-weatherapi/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

WeatherAPI
==========

[](#weatherapi)

WeatherAPI is a Laravel based API that has endpoints for getting the weather from a weather api, with parameters to select a location.

Installation
------------

[](#installation)

```
composer require richard-parnaby-king/weatherapi
```

Usage
-----

[](#usage)

There are three API endpoints:

- POST /api/user/create - used to create a new user (optional if user has already been defined in Laravel)
- POST /api/user/token - provide user login credentials to generate a JWT token
- GET /api/weather - Requires the paramter "location" with the name of the city or postcode. Requires the Authorization header with the generated JWT token.

```
//Create a User Token (assumes user has already been created).
curl --location --request POST 'http://localhost/api/user/token' \
--form 'email="example@domain.co.uk"' \
--form 'password="Password1"' \
//will return a string for example "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2NjczODg0OTksImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdCIsIm5iZiI6MTY2NzM4ODQ5OSwiZXhwIjoxNjY3Mzg4ODU5LCJlbWFpbCI6InJpY2hhcmRAcGFybmFieS1raW5nLmNvLnVrIiwidXNlcl9pZCI6NH0.Nzmdn1KYn1iCUjYG_LSgV8AH3dYdzQ8FreI6tZ-Iom4"

//Fetch weather json using generated token
curl --location --request GET 'http://localhost/api/weather?location=chester' \
--header 'accept: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2NjczODg0OTksImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdCIsIm5iZiI6MTY2NzM4ODQ5OSwiZXhwIjoxNjY3Mzg4ODU5LCJlbWFpbCI6InJpY2hhcmRAcGFybmFieS1raW5nLmNvLnVrIiwidXNlcl9pZCI6NH0.Nzmdn1KYn1iCUjYG_LSgV8AH3dYdzQ8FreI6tZ-Iom4'
//will return a json string on weather data
```

Dependencies
------------

[](#dependencies)

This package requires the following dependencies:

- laravel/laravel

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b123a06bc7b21c43aedcbc7a5998bd03666a2ca772d99664b55725e12477c3d?d=identicon)[RichardParnabyKing](/maintainers/RichardParnabyKing)

---

Top Contributors

[![rparnabyking](https://avatars.githubusercontent.com/u/61009472?v=4)](https://github.com/rparnabyking "rparnabyking (5 commits)")

### Embed Badge

![Health badge](/badges/richard-parnaby-king-weatherapi/health.svg)

```
[![Health](https://phpackages.com/badges/richard-parnaby-king-weatherapi/health.svg)](https://phpackages.com/packages/richard-parnaby-king-weatherapi)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M96](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
