mhauri/lotto-parser
Composer 安装命令:
composer require mhauri/lotto-parser
包简介
Get the lotto numbers from the last draw of Swiss Lotto & Euro Millions
README 文档
README
Lotto Parser
PHP library for parsing Swiss Lotto and Euro Millions results from Swisslos.
Installation
composer require mhauri/lotto-parser
Usage
To get the latest results from Swiss Lotto
<?php use LottoParser\Client\SiwssLotto $lotto = new SwissLotto(); $data = $lotto->current()->get(); // to Array $data = $lotto->current()->toArray(); // to JSON $data = $lotto->current()->toJson();
To get the results from a specific date
<?php
use Carbon\Carbon;
use LottoParser\Client\SiwssLotto
$lotto = new SwissLotto();
$date = Carbon::create(2021,02,13);
$data = $lotto->byDate($date)->get();
// to Array
$data = $lotto->byDate($date)->toArray();
// to JSON
$data = $lotto->byDate($date)->toJson();
The same applies for Euro Millions, just replace $lotto = new SwissLotto() with
$lotto = new EuroMillions();
Support
If you have any issues with this library, open an issue on GitHub.
Contribution
Any contribution is highly appreciated. The best way to contribute code is to open a pull request on GitHub.
Developer
Marcel Hauri, and all other contributors
License
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-02-23