mascotgaming/php-api-client 问题修复 & 功能扩展

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

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

mascotgaming/php-api-client

最新稳定版本:v1.2.0

Composer 安装命令:

composer require mascotgaming/php-api-client

包简介

README 文档

README

Operator API v1 client for PHP.

Requirements

  • PHP 5.6.3 or higher
  • The phpseclib3 library. > - (required for secure 64-bit nonce generation used by the signature mechanism)
  • OpenSSL and cURL extensions (required by json-rpc client)

Example of usage:

<?php
use mascotgaming\mascot\api\client\Client;

require __DIR__.'/vendor/autoload.php';

$client = new Client(array(
        // This is the base URL for the Operator API v1.
        'url' => 'https://api.mascot.games/v1/',

        // This is the file path for the Operator API v1 key.
        'sslKeyPath' => __DIR__.'/ssl/apikey.pem',

        // Sometimes it's useful to enable debug mode.
        // 'debug' => true,
));

// This will list all games.
var_export($client->listGames(array()));

Example of usage with signature authentication method:

NOTE: Please refer to corresponding documentation regarding the "Signature authentication method".

<?php
use mascotgaming\mascot\api\client\Client;

require __DIR__.'/vendor/autoload.php';

$client = new Client(array(
    'url' => 'https://customer.mascot.games/v1/signed/',
    'debug' => true,
    'ssl_verification' => false,
    'signature_verification' => true,
    'signature' => array(
        'key_id' => 'example-key',
        'key_value' => 'ExampleKeyValue',
        'casino_id' => $myCasinoID,
        'nonce_start' => $randomNonceInt64,
    ),
));

var_export($client->listGames([]));

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-09-30