PHP Classes

File: examples/

Recommend this page to a friend!
  Classes of Andre Roque Filipe  >  PHP Short URL Class  >  examples/  >  Download  
File: examples/
Role: Documentation
Content type: text/plain
Description: Documentation
Class: PHP Short URL Class
Shorten URLs using different Web services APIs
Author: By
Last change:
Date: 3 years ago
Size: 844 bytes


Class file image Download

Simple example on How to use the APIcaller to call an API

API used:

##How to use this class:
//Initializing the caller
$weather = new MASNathan\Openweathermap\Openweathermap('my_api_key');
//Setting the default properties

//Getting current weather data
$weather->getCurrentWeatherByCoordinats(35, 139);

//Getting forecast weather data
$weather->getForecastByCoordinats(35, 139);
$weather->getForecastByID(2172797, 4);

//Searching of city
$weather->getForecastByCity('London,uk', 10, 'accurate');
$weather->getForecastByCoordinats(57, -2.15);

//Get the last call to the API