定制 lucasaba/soccersapi 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

lucasaba/soccersapi

Composer 安装命令:

composer require lucasaba/soccersapi

包简介

PHP Client for rapidapi.com

README 文档

README

UnitTests Psalm

RapidAPI - PHP Soccer client

RapidAPI offers different kind of api information.

This library is a PHP client for (some) of the Soccer API v3.

Installation

...package to be published

Usage

In order to use this library you need to create a Client

The client needs a HttpClientInterface, a serializer and the API Token:

$serializer = SerializerBuilder::create()->build();
$client = new Client(HttpClient::create(), $serializer, 'this-is-a-secret-token');

Then, you need to feed the client with a request. Request are in the src/Request folder.

Each request ha different kind of parameters. You can use autocomplete to have a suggestion of them.

E.g.

$request = new LeaguesRequest();
$request->withCountry('Italy')
    ->withSeason(2021)
    ->withType(League::LEAGUE_TYPE_CUP);

$response = $client->get($request, LeaguesResponse::class, true);

The second argument of the client get method is the expected response type. It is used by the serializer to correctly deserialize the object.

Have fun!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固