vashona/api

v1.0.3 2016-12-16 01:04 UTC

This package is not auto-updated.

Last update: 2025-06-21 23:16:24 UTC


README

This library provides you with easy access to VaShona's API using PHP. Before you can do some tests you need to obtain a user from http://vashona.com/contacts

Tech

The API uses a Basic Auth to authenticate users:

Examples

The API requires Guzzle v6.2+ to run.

Download and extract the latest pre-built release.

It is recommended that you install via composer.

$ composer require vashona/api

API

// 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');