PHPackages                             chedianai/car-parts-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. chedianai/car-parts-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

chedianai/car-parts-sdk
=======================

车型库SDK

1.0.9(8y ago)06.8k11MITPHPPHP &gt;=5.6.4

Since Feb 27Pushed 8y ago3 watchersCompare

[ Source](https://github.com/chedianai/sdk-car-parts)[ Packagist](https://packagist.org/packages/chedianai/car-parts-sdk)[ RSS](/packages/chedianai-car-parts-sdk/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (9)Dependencies (5)Versions (11)Used By (1)

车型库 SDK
=======

[](#车型库-sdk)

> author JohnWang

使用说明
----

[](#使用说明)

此 SDK 仅限`车店AI`内部项目使用,请勿外泄;

### 配置

[](#配置)

### Composer 引入

[](#composer-引入)

```
{
    "require": {
		"chedianai/car-parts-sdk":"~1.0"
    }
}
```

### 使用实例

[](#使用实例)

```

public function debug()
{
        $app = new \CarParts\Application([
            /**
             * 账号基本信息
             */
            'client_id'     => 'yPA16XMemwaWpy227WKyORx7QLrKEZgq',
            'client_secret' => 'xxHqlpVsdHUCwxADBMAdy8L3Yrm8p5oCRGbil8Id',

            /**
             * 指定 API 调用返回结果的类型：array(default)/collection/object/raw/自定义类名
             */
            'response_type' => 'collection',

            /**
             * 接口请求相关配置，超时时间等，具体可用参数请参考：
             * http://docs.guzzlephp.org/en/stable/request-config.html
             *
             * - retries: 重试次数，默认 1，指定当 http 请求失败时重试的次数。
             * - retry_delay: 重试延迟间隔（单位：ms），默认 500
             * - log_template: 指定 HTTP 日志模板，请参考：https://github.com/guzzle/guzzle/blob/master/src/MessageFormatter.php
             */
            'http'          => [
                'retries'     => 1,
                'retry_delay' => 500,
                'timeout'     => 5.0,
                // 'base_uri' => 'http://carparts.chedianai.com/', // 如果你在使用开发环境，则可以覆盖该参数
            ],
        ]);

        /**
         * 注入缓存实例，用于 AccessToken 缓存，必须为 Psr\SimpleCache\CacheInterface 实例
         */
        // $app['cache'] = new \CarParts\Kernel\Support\CacheBridge(app('cache.store'));

        try {
            dd(
                // 获取分类下所有品牌
                $app->brand->brands('ENGINE_OIL'),

                // 配件分类
                $app->category->categories(),

                // 车辆品牌列表
                $app->vehicle->brands(),

                // 车型列表
                $app->vehicle->models(9),

                // 车辆销售版本列表
                $app->vehicle->vehicles(292),

                // 车辆销售版本详情
                $app->vehicle->detail('52c7ceba'),

                // 根据 VIN 码获取车型信息
                $app->vehicle->findByVIN('LVRHDFACXFN377424'),

                // 所有商品列表
                $app->item->items(),

		// 根据ids查询所有商品列表
		$app->item->itemsByIds($ids),

                // 车型推荐商品（分类编排）
                $app->item->itemsGroupByCategory('b41ba195'),

                // 商品详情
                $app->item->detail('e468c069'),

                //获取车型匹配同产品所有规格产品
                $app->item->pairItems('b41ba195', 'e468c069')
            );
        } catch (\GuzzleHttp\Exception\ClientException $e) {
            echo $e->getMessage();
        }
}

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

10

Last Release

2988d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bbbdaf4d970a76a33bd811da420e5315d6be9a302f5516cb8357b05c7ef2e4de?d=identicon)[takatost](/maintainers/takatost)

![](https://www.gravatar.com/avatar/36f0f5012151dd69c675a962497d828b0db10165a87ed50bd87e80e307f01fed?d=identicon)[chedianai](/maintainers/chedianai)

---

Top Contributors

[![takatost](https://avatars.githubusercontent.com/u/5485478?v=4)](https://github.com/takatost "takatost (12 commits)")[![caikeal](https://avatars.githubusercontent.com/u/11376690?v=4)](https://github.com/caikeal "caikeal (2 commits)")[![hming](https://avatars.githubusercontent.com/u/3996117?v=4)](https://github.com/hming "hming (2 commits)")

---

Tags

laravelsdkchedianaicar-parts

### Embed Badge

![Health badge](/badges/chedianai-car-parts-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/chedianai-car-parts-sdk/health.svg)](https://phpackages.com/packages/chedianai-car-parts-sdk)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
