checkmango/php-sdk
最新稳定版本:v1.0.0
Composer 安装命令:
composer require checkmango/php-sdk
包简介
The PHP SDK for Checkmango
关键字:
README 文档
README
This project is heavily inspired by Graham Campbell's packages; Bitbucket and GitLab.
Installation
This version supports PHP 7.2-8.2. To get started, require the project using Composer. You will also need to install packages that provide psr/http-client-implementation and psr/http-factory-implementation.
Standard Installation
composer require "checkmango/php-sdk:dev-master" "guzzlehttp/guzzle:^7.2" "http-interop/http-factory-guzzle:^1.0"
Laravel Installation
composer require "checkmango/laravel:dev-master" "guzzlehttp/guzzle:^7.2" "http-interop/http-factory-guzzle:^1.0"
Usage
// Authentication $client = new Checkmango\Client(); $client->authenticate('your_api_token'); // Example API Call $experiment = $client->teams($teamId)->experiments()->show('EXPERIMENT_KEY'); $client->teams($teamId)->ingest()->store('EXPERIMENT_KEY', 'PARTICIPANT_KEY', 'VARIANT_KEY'); // Track impression $client->teams($teamId)->ingest()->store('EXPERIMENT_KEY', 'PARTICIPANT_KEY', 'VARIANT_KEY', 'EVENT_KEY'); // Track conversion
Example with Pager
The Pager class allows you to easily retrieve all results across multiple pages of results.
$pager = new Checkmango\ResultPager($client); $experiments = $pager->fetchAll($client->teams($teamId)->experiments(), 'all');
Security
If you discover a security vulnerability within this package, please email James Brooks at james@checkmango.com. All security vulnerabilities will be promptly addressed. You may view our full security policy here.
License
Checkmango PHP SDK is licensed under The MIT License (MIT).
统计信息
- 总下载量: 1.65k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-16