1. Go to this page and download the library: Download aqtivite/php 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/ */
aqtivite / php example snippets
use Aqtivite\Php\Aqtivite;
$client = new Aqtivite('client-id', 'client-secret');
$client->setAccount('[email protected]', 'sifre');
$client->login();
$response = $client->user()->users()->get();
$client = new Aqtivite('client-id', 'client-secret');
$client->testMode(); // api.test.aqtivite.com.tr adresine bağlanır
$response = $client->user()->users()->find('mehmet.ogmen');
$response->successful(); // true
$response->failed(); // false
$response->data; // Veri (array veya object)
$response->elapsedTime; // Süre
$response = $client->user()->users()->get();
$response->data; // Veri listesi
$response->total; // Toplam kayıt
$response->currentPage; // Mevcut sayfa
$response->lastPage; // Son sayfa
$response->from; // Başlangıç
$response->to; // Bitiş
$response->hasNextPage(); // Sonraki sayfa var mı?
$response->hasPreviousPage(); // Önceki sayfa var mı?
use Aqtivite\Php\Exceptions\AuthenticationException;
use Aqtivite\Php\Exceptions\ApiException;
use Aqtivite\Php\Exceptions\AqtiviteException;
try {
$client->login();
$response = $client->user()->users()->get();
} catch (AuthenticationException $e) {
// Kimlik doğrulama hatası
echo $e->getMessage();
} catch (ApiException $e) {
// API hatası
echo $e->getMessage();
echo $e->getCode(); // HTTP hata kodu
echo $e->errorType; // Hata tipi (ör: "app")
} catch (AqtiviteException $e) {
// Genel SDK hatası
echo $e->getMessage();
}
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.