承接 bc-automotive/master-api-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

bc-automotive/master-api-client

最新稳定版本:v1.0.0

Composer 安装命令:

composer require bc-automotive/master-api-client

包简介

bFlash Master Api Client

README 文档

README

The bc-automotive/master-api-client package is a library that eases integration of the bFlash Master API in your site.

Installation

Install the package via composer:

composer require bc-automotive/master-api-client

Usage

The api uses authentication using a bearer token. Contact bFlash support to request your authentication token.

Encrypt a slave file:

use \BcAutomotive\MasterApiClient\MasterApiClient;

$client = new MasterApiClient($apiKey);

$data = file_get_contents('/path/to/data.bdc');
$encrypted = $client->encrypt($data, $slaveName);
file_put_contents('/path/to/data.sbdc', $encrypted['data']);

Decrypt a slave file:

use \BcAutomotive\MasterApiClient\MasterApiClient;

$client = new MasterApiClient($apiKey);

$data = file_get_contents('/path/to/data.sbdc');
$decrypted = $client->decrypt($data);
file_put_contents('/path/to/data.sbdc', $decrypted['data']);

Laravel Integration

The package has a laravel service provider and facade to ease integration, so after including the package inside your laravel project, you can add the key to the .env file

MASTER_API_KEY=your_key_here

And use the facade:

use MasterApiClient;

$encrypted = MasterApiClient::encrypt($data, $slaveName);
$decrypted = MasterApiClient::decrypt($data);

Exceptions

The MasterApiClient class is a small wrapper around the Guzzle http client library, so this class can throw all regular Guzzle exceptions as well. You can file the Guzzle docs here.

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-05-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固