propellocloud/propello-php-sdk
Composer 安装命令:
composer require propellocloud/propello-php-sdk
包简介
PHP SDK for easy integration with Propello Clouds API V3
README 文档
README
This package is intended to allow clients to integrate with the Propello Cloud API with minimal intervention.
Requirements
- PHP: 8.3+
Installation
You can install the package via composer:
composer require propellocloud/propello-php-sdk
Currently, all of Propello Clouds V3 User endpoints have been implemented in this SDK. This functionality will be expanded as the API is further developed, as such you should aim to make use of the latest version at all times.
Authentication
In order to connect to the API you will first need to authenticate your instance with either a Bearer Token
or a Client Secret and Client ID.
use PropelloCloud\Client; // with Bearer Token $client = new Client(bearerToken: $bearerToken); // with client secret & ID $client = new Client(clientId: $clientId, clientSecret: $clientSecret);
NOTE: It is highly recommended that you implement the bearer token method as this requires fewer calls to the API and is far less data intensive.
Bearer tokens are valid for 1 year and can be obtained as follows:
use PropelloCloud\Client; $client = new Client(clientId: $clientId, clientSecret: $clientSecret); $bearerToken = $client->getBearerToken();
Security
Propello cloud does not bear any liability or responsibility for the security of your API credentials; as such it is vital that you take all possible steps to prevent unauthorised access.
Usage
The below are all currently available methods:
use PropelloCloud\Client; $client = new Client(bearerToken: $bearerToken); // Creates a user $client->user->create(array $user); // Create multiple users (max 100) $client->user->createBulk(array $users, bool $sendEmails) // Creates a user and returns user one-time login URL $client->user->createUserWithLogin(array $user); // Returns a users details $client->user->getUserByEmail(string $email); $client->user->getUserByUid(string $uniqueId); $client->user->getUserById(int $id); // Returns a user one-time login URL $client->user->getLoginByEmail(string $email); $client->user->getLoginByUid(string $uniqueId); $client->user->getLoginById(int $id); // Deletes a user $client->user->deleteByEmail(string $email); $client->user->deleteByUid(string $uniqueId); $client->user->deleteById(int $id); // Restores a deleted user $client->user->restoreByEmail(string $email); $client->user->restoreByUid(string $uniqueId); $client->user->restoreById(int $id); // Anonymises a users details $client->user->anonymiseByEmail(string $email); $client->user->anonymiseByUid(string $uniqueId); $client->user->anonymiseById(int $id); // Restore anonymised user account with details $client->user->makeKnownByUid(string $uniqueId, array $userDetails); $client->user->makeKnownById(int $id, array $userDetails); // Returns a paginated list of users $client->user->list(array $filters); // Returns redemption stats for a user $client->user->getRedemptionStatsByEmail(string $email); $client->user->getRedemptionStatsByUid(string $uniqueId); $client->user->getRedemptionStatsById(int $id);
Groups
use PropelloCloud\Client; $client = new Client(bearerToken: $bearerToken); // Returns the current organisation group $client->group->get(); // If your token has organisation or global access, pass the group ID explicitly $client->group->get(int $organisationGroupId); // Returns all organisation groups (requires organisation-level access) $client->group->list();
Orders
use PropelloCloud\Client; $client = new Client(bearerToken: $bearerToken); // Returns a paginated list of all orders for the group $client->orders->listGroupOrders(array $filters); // Available filters: per_page, page, order_created_from, order_created_to, order_status, brand_id, brand_name, organisation_group_id // Returns orders for a specific user $client->orders->listUserOrdersByEmail(string $email, array $filters); $client->orders->listUserOrdersByUid(string $uniqueId, array $filters); $client->orders->listUserOrdersById(int $id, array $filters);
Offers
use PropelloCloud\Client; $client = new Client(bearerToken: $bearerToken); // Returns a list of offers $client->offers->list(); // If your token has organisation or global access, pass the group ID explicitly $client->offers->list(int $organisationGroupId); // Returns a single offer by ID $client->offers->get(int $id); $client->offers->get(int $id, int $organisationGroupId);
Interactions
use PropelloCloud\Client; $client = new Client(bearerToken: $bearerToken); // Returns a list of interactions for a specific user $client->interactions->listByEmail(string $email, array $filters); $client->interactions->listByUid(string $uniqueId, array $filters); $client->interactions->listById(int $id, array $filters); // Stores an interaction for a specific user $client->interactions->storeByEmail(string $email, array $interaction); $client->interactions->storeByUid(string $uniqueId, array $interaction); $client->interactions->storeById(int $id, array $interaction);
Credits
License
The MIT License (MIT). Please see License File for more information.
propellocloud/propello-php-sdk 适用场景与选型建议
propellocloud/propello-php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 04 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「PropelloCloud」 「propello-php-sdk」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 propellocloud/propello-php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 propellocloud/propello-php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-10