PHP code example of carono / etxtru-api
1. Go to this page and download the library: Download carono/etxtru-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/ */
carono / etxtru-api example snippets
// Получение баланса
$client->apiKey = 'token';
$client->password = 'password';
$response = $client->users()->getBalance();
// Создание заказа
$config = new \carono\etxtru\config\TasksSaveTaskConfig();
$config->public = 0;
$config->title = 'Задача 1';
$config->description = 'Описание';
$config->price = 5;
$config->price_type = 1;
$config->size = 500;
$config->id_folder = 'folder_name';
$config->deadline = '30.10.2018';
$config->id_category = 1938;
$config->file = fopen('/path/file.jpg', 'rb');
$response = $client->tasks()->saveTask($config);
$client->categories();
$client->categories()->listCategories();
$client->folders();
$client->folders()->listFolders($sort);
$client->folders()->addFolder($name, $id_parent);
$client->folders()->moveToFolder($id_folder, $type, $ids);
$client->users();
$client->users()->getList($config);
$client->users()->getBW($count, $from, $id_group, $type);
$client->users()->getNote($id);
$client->users()->getUser($id, $login);
$client->users()->getWorks($id);
$client->users()->getReports($id);
$client->users()->setReport($config);
$client->users()->getUserBW($id);
$client->users()->setUserBW($id, $id_group, $type);
$client->users()->getBalance();
$client->tasks();
$client->tasks()->listTasks($config);
$client->tasks()->viewNotes($id);
$client->tasks()->viewNotesAll();
$client->tasks()->setNote($id, $comment);
$client->tasks()->unsetNote($id);
$client->tasks()->paidTask($id);
$client->tasks()->cancelTask($id, $text);
$client->tasks()->getResults($id);
$client->tasks()->deleteTask($id);
$client->tasks()->extraPaid($id, $count, $note, $autopay);
$client->tasks()->saveTask($config);
$client->tasks()->failTask($id, $copy, $deadline, $timeline);
$client->tasks()->copyTask($id, $deadline, $timeline);
$client->tasks()->setDeadline($id, $deadline, $timeline, $public);
$client->tasks()->saveComment($id, $text, $hide);
$client->tasks()->sendNoteFail($id, $text);
$client->tasksArchive();
$client->tasksArchive()->listTasks($config);
$client->tasksArchive()->getResults($id);
$client->options();
$client->options()->getLangs();
$client->articles();
$client->articles()->getList($config);
$client->articles()->buy($id);
$client->articles()->getText($id);
$client->articles()->download($id);
$client->articlesArchive();
$client->articlesArchive()->getList($config);
$client->articlesArchive()->getText($id);
$client->articlesArchive()->download($id);
$client->bwgroups();
$client->bwgroups()->listGroups();
$client->bwgroups()->saveGroup($name, $id, $id_parent);
$client->bwgroups()->deleteGroup($id);
$client->bwgroups()->updateGroup($id_user, $id_group);
$client->messages();
$client->messages()->getList($from);
$client->messages()->setRead($ids);
$client->messages()->setDelete($ids);
$client->messages()->readPrivate($config);
$client->messages()->getCountUnread();
$client->messages()->writePrivate($id_user, $text);
$client->rating();
$client->rating()->listTasksFails($id_task, $id_user, $back);
$client->rating()->ratingUserBack($id_task, $id_user);
$client->diff();
$client->diff()->compareText($source, $text);
$client->correction();
$client->correction()->add($config);
$client->correction()->import($config);