1. Go to this page and download the library: Download palanik/wrapi library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
palanik / wrapi example snippets
"function_name" => array(
"method" => "HTTP_METHOD", // 'GET', 'POST', 'PUT', 'PATCH' or 'DELETE'
"path" => "relative/path/to/:api/endpoint" // Can use `Slim`/`express` style path params
)
$endpoints = array(...);
$client = new wrapi\wrapi('https://api.github.com/', // base url for the API
endpoints // your endpoints array
);
// client object contains functions to call the API
// This will make GET request to 'https://api.github.com/repos/guzzle/guzzle/contributors'
$contributors = $client->contributors('guzzle', 'guzzle');
$zenQuote = $client->zen();
echo "Today's quote: ". $zenQuote;
$client(function_name, endpoint_definition)
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.