PHP code example of vashona / api
1. Go to this page and download the library: Download vashona/api 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/ */
vashona / api example snippets
// Translate 'child' from 'English' to 'Shona'.
use vashona\api\TranslatorApi;
$TranslatorApi = new TranslatorApi ();
$TranslatorApi->setServerUrl('https://api.vashona.com/api1/translator/');
$TranslatorApi->setAuth('Username', 'password');
$json = $TranslatorApi->getTranslation('child', 'sna', 'en');