Download the PHP package asti/weather without Composer

On this page you can find all versions of the php package asti/weather. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package weather

Build Status

Scrutinizer Code Quality Code Coverage Build Status Code Intelligence Status

Anax module for weather forecast and history

This module can be incorporated with the Anax framework to provide a service that checks weahter forecast and historical weather data based on ip-adress. The module was created as a part of the course Webbaserade ramverk och designmönster, Blekinge Tekniska Högskola.

To install

In your composer.json do:

    composer require asti/weather

Integrate the module

From the root of your Anax repo run:

Manually:

    rsync -av vendor/asti/weather/config ./

    rsync -av vendor/asti/weather/view ./

    rsync -av vendor/asti/weather/src ./

    rsync -av vendor/asti/weather/test ./

Or simply:

    bash vendor/asti/weather/.anax/scaffold/postprocess.d/100_weather.bash

Add API-key

version 1.1.0 You need to use your own API key from Open Weather. Add you key in the config/weather.php file as a value to the key "API-key". You need to use your own API key from IP stack. Add you key in the config/location.php file as a value to the key "API-key".

version 1.2.0 You need to use your own API key from Open Weather. You need to use your own API key from IP stack.

Create a {your root directory}/.env file and add your key value pairs like in the example:

LOCATIONAPIKEY={your location api key}\ WEATHERAPIKEY={your weather api key}

Don't forget to att your .env to .gitignore

Update your config/page.php

The module uses a very basic page layout anax/v2/layout/default. This can be changed in config/page.php to anax/v2/layout/dbwebb_se.

Update your navigation:

Add IP and Weather to your navbar via config/navbar/header.php and via config/navbar/responsive.php

You will need to insert the following lines of code into the items-key in the above files.

    [
        "text" => "Väder",
        "url" => "weather",
        "title" => "Få väderprognos",
    ],
    [
        "text" => "VäderAPI",
        "url" => "weather_api",
        "title" => "Få väderprognos",
    ],

All versions of weather with dependencies

PHP Build Version
Package Version
Requires anax/anax-ramverk1-me Version ^1.0.0
anax/commons Version ^2.0.14
ext-json Version *
ext-curl Version *
anax/anax Version v2.0.17
phpmetrics/phpmetrics Version ^2
phpunit/phpunit Version ^7
vlucas/phpdotenv Version ^5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package asti/weather contains the following files

Loading the files please wait ....