Download the PHP package valentinbv/wialon-php-sdk without Composer

On this page you can find all versions of the php package valentinbv/wialon-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wialon-php-sdk

wialon-php-sdk

PHP library for Wialon API interaction, includes API methods.

1. Prerequisites

2. Installation

The wialon-php-sdk can be installed using Composer by running the following command:

composer require valentinbv/wialon-php-sdk

For install from git add to composer.json:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/ValentinBV/wialon-php-sdk.git"
        }
    ],
    "require": {
        "valentinbv/wialon-php-sdk": "dev-master"
    }
}

3. Initialization

Create Wialon API Client object using the following code:

$httpClient = new GuzzleHttp\Client();
$wialonRequest = new valentinbv\Wialon\Request\Action($httpClient);
$wialonRequest->sid='your sid';

4. API Requests

You can find the full list of Wialon API methods https://sdk.wialon.com/wiki/en/start.

Request sample

Example of calling method core/get_account_data:

$httpClient = new GuzzleHttp\Client();
$wialonRequest = new valentinbv\Wialon\Request\Action($httpClient);
$wialonRequest->sid='your sid';
try {
    $result = $wialonRequest->execute(
        'core/get_account_data',
        ['type' => 2]
    );
} catch(\Exception  $e) {
    //some action
}

The $result array contains the result of the query to the wialon server according to the documentation https://sdk.wialon.com/wiki/en/start

5. Structure

All classes for working with the Wialon API are derived from the base class.valentinbv\Wialon\Request\BaseRequest

So, you can execute a request to the Wialon API using the base class

$httpClient = new GuzzleHttp\Client();
$wialonRequest = new valentinbv\Wialon\Request\BaseRequest($httpClient);
$wialonRequest->sid='your sid';
try {
    $result = $wialonRequest->request(
        [
            'sid' => 'your sid',
            'svc' => 'core/get_account_data',
            'params' => json_encode(['type' => 1])
        ]
    );
} catch(\Exception  $e) {
    //some action
}

The above method is convenient to use when you need to execute an arbitrary request or a request from a section https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/requests/requests

For most requests, the valentinbv\Wialon\Request\Action class is more convenient.

A special class for receiving events has also been added. This query is conveniently used to maintain a session according to the documentation. https://sdk.wialon.com/wiki/en/sidebar/remoteapi/apiref/requests/avl_evts

$httpClient = new GuzzleHttp\Client();
$wialonRequest = new valentinbv\Wialon\Request\Events($httpClient);
$wialonRequest->sid='your sid';
try {
    $result = $wialonRequest->execute();
} catch(\Exception  $e) {
    //some action
}

support: [email protected]


All versions of wialon-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
guzzlehttp/guzzle Version ~6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package valentinbv/wialon-php-sdk contains the following files

Loading the files please wait ....