brixion/ulu-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

brixion/ulu-php

Composer 安装命令:

composer require brixion/ulu-php

包简介

Typed PHP SDK for the ULU (CarTracker) REST API

README 文档

README

Typed PHP SDK for the ULU API (CarTracker fleet tracking).

Requirements

  • PHP 8.2+
  • Composer

Installation

composer require brixion/ulu-php

For local development from this repository:

composer install

Quick start

Authenticate with email and password

use Brixion\Ulu\UluClient;

$ulu = UluClient::authenticate('user@example.com', 'your-password');
$token = $ulu->getAccessToken();

Use an existing API token

use Brixion\Ulu\UluClient;

$ulu = UluClient::withToken(getenv('ULU_TOKEN'));

Fetch company, vehicles, and trips

$company = $ulu->companies()->me();
echo $company->name;

$vehicles = $ulu->vehicles()->list(page: 1, limit: 50);
foreach ($vehicles->items as $vehicle) {
    echo $vehicle->licensePlate;
}

$trips = $ulu->trips()->listForVehicle(
    vehicleId: 1376,
    fromStartAt: '2017-02-23T00:00',
    toStartAt: '2017-02-24T00:00',
);

$trip = $ulu->trips()->get(242070);
echo $trip->distance;

API coverage

All documented ULU API v1 endpoints are available through resource services on UluClient:

Resource Methods
sessions() create()
companies() me(), get(), list(), create(), update(), delete()
users() create(), resetPassword(), changePassword()
companyUsers() list(), get(), create(), delete()
companyGroups() create(), update(), list(), get(), delete()
companyUserGroups() create(), update(), list(), get(), delete()
vehicleCompanyGroups() create(), list(), get(), delete()
ibuttons() create(), update(), list(), get(), delete()
userIbuttons() create(), update(), list(), get(), delete()
devices() list()
vehicles() list(), get(), create(), update(), disconnect(), delete()
scores() getForVehicle()
vehicleErrors() listForVehicle()
trips() listForVehicle(), get(), createFromTracker(), tripTypes(), tripPoints()
hotspots() list()

Error handling

API failures throw Brixion\Ulu\Exception\ApiException. Authentication problems throw AuthenticationException.

use Brixion\Ulu\Exception\ApiException;

try {
    $ulu->companies()->me();
} catch (ApiException $e) {
    echo $e->getMessage();
    print_r($e->getErrors());
}

Testing

composer test
composer analyse

License

MIT

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固