armandsar/pinnacle-pineapple

pinnaclesports 的 API 客户端

0.1.2 2017-03-30 17:12 UTC

This package is not auto-updated.

Last update: 2024-09-22 07:08:11 UTC


README

Software License Build Status Total Downloads

为 Laravel 5 提供的简单 pinnacle api 客户端。

安装

通过 Composer

$ composer require armandsar/pinnacle-pineapple

更新 composer 后,将 ServiceProvider 添加到 config/app.php 中的 providers 数组

Armandsar\PinnaclePineapple\PinnaclePineappleServiceProvider::class,

发布 API 凭据配置

$ php artisan vendor:publish

用法

$client = new Armandsar\PinnaclePineapple\PinnacleClient();

或者让 Laravel 通过在构造函数或控制器方法中类型提示依赖项来完成此操作

可用方法

赔率

$client->odds($options);

特殊赔率

$client->specialOdds($options);

赛事

$client->fixtures($options);

特殊赛事

$client->specialFixtures($options);

已结算赛事

$client->settledFixtures($options);

联赛

$client->leagues($options);

体育

$client->sports($options);

$options 只是一个数组,用于向 API 传递参数和值,对于大多数端点,都需要某种类型的参数

您也可以使用链式方法来传递此参数

$client->since($when)->odds(['sportId' => 29]);

测试

$ phpunit

许可

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