checkmango/php-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-16