digitonic / dealmaker-api

适用于 DealMaker API 的 Laravel 包

1.0.2-alpha 2024-04-29 12:00 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

警告:这不是一个完整的包,不适合使用。这是一个正在进行中的工作,仅包含几个只读端点

DealMaker API 的 Laravel 封装

安装

您可以通过 composer 安装此包

composer require digitonic/dealmaker-api

您可以使用以下命令发布配置文件

php artisan vendor:publish --tag="dealmaker-api-config"

这是已发布配置文件的内容

return [
    /**
     * The Client ID displayed when you created the OAuth application in the portal
     * This is typically called the "Public Key" in the portal
     */
    'client_id' => env('DEALMAKER_CLIENT_ID', ''),

    /**
     * The Client Secret displayed when you created the OAuth application in the portal
     * This is typically called the "Secret Key" in the portal
     */
    'client_secret' => env('DEALMAKER_CLIENT_SECRET', ''),

    /**
     * The scope is established when you created the OAuth application
     * This is typically called the "Scopes" in the portal
     */
    'scopes' => env('DEALMAKER_SCOPES', ''),
    
        /**
     * The DealMaker Deal ID for the current investment landing page
     */
    'deal_id' => env('DEALMAKER_DEAL_ID', ''),
];

用法

$auth = new DealMakerApiAuth();
$token = $auth->getAccessToken();
$dealmakerApi = new Digitonic\DealmakerApi\DealmakerApi($token);
$deals = new Digitonic\DealmakerApi\Requests\Deal\ListDeals();

$response = $dealmakerApi->send($deals);

测试

composer test

变更日志

有关最近更改的更多信息,请参阅 变更日志

贡献

有关详细信息,请参阅 贡献指南

安全漏洞

有关如何报告安全漏洞,请审查 我们的安全策略

鸣谢

许可证

MIT 许可证(MIT)。有关更多信息,请参阅 许可证文件