wherewhere / sdk
WhereWhere.cloud
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/wherewhere/sdk
Requires
- php: ^7.3 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2025-12-20 11:04:14 UTC
README
WhereWhere.cloud
Installation & Usage
Requirements
PHP 7.3 and later. Should also work with PHP 8.0 but has not been tested.
Composer
To install the bindings via Composer, add the following to composer.json:
{
"require": {
"wherewhere/sdk": "*@dev",
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
<?php require_once('/path/to/wherewhere-php/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // New ApiInstance $apiInstance = Wherewhere\ApiInstance::New('YOUR_ACCESS_TOKEN'); $tags = '深圳'; // string | 标签名称,支持同时查询多个,用英文逗号隔开 $mark = 'mark_example'; // string | 设备备注 $imei = 'xxx'; // string | 设备imei,支持同事查询多个,用英文逗号隔开 $account_id = 'account_id_example'; // string | 子账户id $include_child = 0; // int | 是否包含子账户,默认是0,返回1时包含子账户的设备 $page = 1; // string $page_size = 50; // int $keyword = 00000; // string | 设备imei或备注模糊查询 try { $result = $apiInstance->devicesGet($tags, $mark, $imei, $account_id, $include_child, $page, $page_size, $keyword); print_r($result); } catch (Exception $e) { echo 'Exception when calling DefaultApi->devicesGet: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api.wherewhere.cloud/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| DefaultApi | accountAuthorizeDevicePost | POST /account/authorize_device | 授权设备 |
| DefaultApi | accountChangePasswordPost | POST /account/change_password | 修改密码 |
| DefaultApi | accountCreatePost | POST /account/create | 添加子账号 |
| DefaultApi | accountRemoveDevicePost | POST /account/remove_device | 移除设备 |
| DefaultApi | accountSetStatusPost | POST /account/set_status | 禁用/启用子账号 |
| DefaultApi | accountUpdatePost | POST /account/update | 修改子账户 |
| DefaultApi | accountsGet | GET /accounts | 子账户列表 |
| DefaultApi | deviceCreatePost | POST /device/create | 添加设备 |
| DefaultApi | devicesGet | GET /devices | 设备列表 |
| DefaultApi | locationGet | GET /location | 获得最新定位 |
| DefaultApi | locationStatusGet | GET /location/status | 设备定位状态统计 |
| DefaultApi | locationUpdatePost | POST /location/update | 更新设备定位 |
| DefaultApi | reportByDeviceGet | GET /report/by_device | 根据设备获得里程统计 |
| DefaultApi | trackAnalysisGet | GET /track/analysis | 获得轨迹分段分析 |
| DefaultApi | trackHistoryGet | GET /track/history | 查询设备历史轨迹 |
Tests
To run the tests, use:
composer install vendor/bin/phpunit