定制 byd/api-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

byd/api-client

Composer 安装命令:

composer require byd/api-client

包简介

PHP client for BYD vehicle API

README 文档

README

PHP client library for the BYD vehicle API.

Features

  • Authentication
  • Vehicle listing
  • Real-time data
  • GPS information
  • HVAC status
  • Charging status
  • Energy consumption
  • Remote control
  • Smart charging
  • Push notifications
  • Vehicle settings

Installation

composer require byd/api-client

Usage

<?php

require_once 'vendor/autoload.php';

use Byd\ApiClient\Client;
use Byd\ApiClient\Config\BydConfig;

// Create configuration
$config = BydConfig::fromEnv([
    'username' => 'your-email@example.com',
    'password' => 'your-password',
    // ... other options
]);

// Create client
$client = new Client($config);

// Login
$client->login();

// Get vehicles
$vehicles = $client->getVehicles();

foreach ($vehicles as $vehicle) {
    echo "VIN: " . $vehicle->getVin() . "\n";
    echo "Model: " . $vehicle->getModelName() . "\n";
    echo "---\n";
}

Configuration

The client can be configured in several ways:

Environment Variables

BYD_USERNAME=your-email@example.com
BYD_PASSWORD=your-password
BYD_BASE_URL=https://dilinkappoversea-eu.byd.auto
BYD_COUNTRY_CODE=NL
BYD_LANGUAGE=en
BYD_TIME_ZONE=Europe/Amsterdam

Direct Configuration

$config = new BydConfig(
    'your-email@example.com',
    'your-password',
    'https://dilinkappoversea-eu.byd.auto', // base URL
    'NL', // country code
    'en', // language
    'Europe/Amsterdam', // time zone
    // ... other options
);

API Documentation

Key classes and methods:

Requirements

  • PHP 8.1+
  • ext-json
  • guzzlehttp/guzzle ^7.0
  • psr/log ^3.0

Development

Install dependencies

composer install

Run tests

composer test

Code style

composer cs-fix

License

This project is licensed under the MIT License - see the LICENSE file for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固