承接 alexjustesen/php-untappd 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

alexjustesen/php-untappd

最新稳定版本:v0.1.0

Composer 安装命令:

composer require alexjustesen/php-untappd

包简介

Unofficial PHP SDK for Untappd

README 文档

README

Unofficial PHP SDK for Untappd API.

Sponsor

Like this package? Consider sponsoring me to help me reach my goals.

Install

composer require alexjustesen/php-untappd

Usage

Authentication

The Untappd API makes use of token based authentication, you can either generate a token using your client ID and secret or using the SSO user's token.

Initialize the request

To get started create a new instance of the SDK.

$untappd = new Untappd();

Handling the response

The SDK makes use of Saloon by Sam Carre, after a request is sent you can interact with the response with any of the documented methods like ->body() or ->json().

In the example below we're requesting a single beer and formatting the response as json.

$request = new GetBeer('beer-id-goes-here');

$response = $untappd->send($request);

$response->json();

Get a beer

$request = new GetBeer('beer-id-goes-here');

$response = $untappd->send($request);

Search for beer

$request = new SearchBeer('brewery name or beer name string');

$response = $untappd->send($request);

Testing

Using PHP CS Fixer

composer fix-code

Using Pest

composer test

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-19