2017 © Pedro Peláez
 

library weather-api-client

image

okaufmann/weather-api-client

  • Sunday, April 15, 2018
  • by okaufmann
  • Repository
  • 1 Watchers
  • 0 Stars
  • 64 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 8 % Grown

The README.md

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen), (*1)

This PHP package is automatically generated by the Swagger Codegen project:, (*2)

  • API version: 0.1
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

Requirements

PHP 5.5 and later, (*3)

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:, (*4)

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/okaufmann/weather-api-client.git"
    }
  ],
  "require": {
    "okaufmann/weather-api-client": "*@dev"
  }
}

Then run composer install, (*5)

Manual Installation

Download the files and include autoload.php:, (*6)

    require_once('/path/to//vendor/autoload.php');

Tests

To run the unit tests:, (*7)

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:, (*8)

setApiKey('api_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Okaufmann\WeatherApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_token', 'Bearer');

$apiInstance = new Okaufmann\WeatherApiClient\Api\ForecastApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$postal_code = 789; // int | Postal code for the location's forecast

try {
    $result = $apiInstance->forecastPostalCodeRainfallGet($postal_code);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ForecastApi->forecastPostalCodeRainfallGet: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to http://localhost/api/v1, (*9)

Class Method HTTP request Description
ForecastApi forecastPostalCodeRainfallGet GET /forecast/{postal_code}/rainfall
ForecastApi forecastPostalCodeTemperatureGet GET /forecast/{postal_code}/temperature
ForecastApi locationsGet GET /locations/
ForecastApi locationsLocationIdGet GET /locations/{location_id}
MeasuredValuesApi stationsGet GET /stations/
MeasuredValuesApi stationsStationIdGet GET /stations/{station_id}
MeasuredValuesApi stationsStationIdRainfallGet GET /stations/{station_id}/rainfall
MeasuredValuesApi stationsStationIdSunshineGet GET /stations/{station_id}/sunshine
MeasuredValuesApi stationsStationIdTemperatureGet GET /stations/{station_id}/temperature
MeasuredValuesApi weatherPostalCodeGet GET /weather/{postal_code}/

Documentation For Models

Documentation For Authorization

api_key

  • Type: API key
  • API key parameter name: api_token
  • Location: URL query string

Author

The Versions

15/04 2018

1.2.0

1.2.0.0 http://swagger.io

  Sources   Download

proprietary

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.4

 

The Development Requires

api php swagger sdk

12/12 2017

dev-master

9999999-dev http://swagger.io

  Sources   Download

proprietary

The Requires

 

The Development Requires

api php swagger sdk

12/12 2017

v1.1.0

1.1.0.0 http://swagger.io

  Sources   Download

proprietary

The Requires

 

The Development Requires

api php swagger sdk

10/12 2017

v1.0.0

1.0.0.0 http://swagger.io

  Sources   Download

proprietary

The Requires

 

The Development Requires

api php swagger sdk