boundstate/petfinder-php 问题修复 & 功能扩展

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

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

boundstate/petfinder-php

最新稳定版本:v1.1.0

Composer 安装命令:

composer require boundstate/petfinder-php

包简介

Petfinder API client

README 文档

README

CircleCI packagist version Coverage Status

A simple wrapper for the Petfinder API, written in PHP.

Uses Petfinder API v2.

Features

  • Uses HTTPlug
  • Supports Async requests
  • Well tested

Requirements

Install

In addition to the Petfinder package, you'll need an HTTPlug client that support async requests. We recommend using php-http/guzzle6-adapter, but you are free to use whatever one works for you.

composer require petfinder-com/petfinder-php php-http/guzzle6-adapter

Usage

Basic usage

$client = new \Petfinder\Client('my-api-key', 'my-api-secret');

$client->animal->search(['type' => 'Dog']);

Using async requests

$client = new \Petfinder\Client('my-api-key', 'my-api-secret');

$client->organization->searchAsync()->then(function (\Petfinder\Result $result) {
    // Do something with $result
})->catch(function (\Petfinder\Exception\ProblemDetailsException $exception) {
    // Do something with $exception
});

Using a custom Httplug client

$builder = new \Petfinder\Http\Builder($myHttpClient);
$client = new \Petfinder\Client('my-api-key', 'my-api-secret', $builder);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2022-02-28