PHPackages                             mattjmattj/yo-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mattjmattj/yo-client

ActiveLibrary[API Development](/categories/api)

mattjmattj/yo-client
====================

Another Yo API client

1.0.1(11y ago)1211BSD-2-ClausePHP

Since Apr 7Pushed 11y ago1 watchersCompare

[ Source](https://github.com/mattjmattj/yo-client)[ Packagist](https://packagist.org/packages/mattjmattj/yo-client)[ RSS](/packages/mattjmattj-yo-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

yo-client
=========

[](#yo-client)

[![Build Status](https://camo.githubusercontent.com/7a6c3662173193185146017530701659546044accdfd2e555c45580eee734e09/68747470733a2f2f7472617669732d63692e6f72672f6d6174746a6d6174746a2f796f2d636c69656e742e737667)](https://travis-ci.org/mattjmattj/yo-client)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b915346a80a8240e3308f39496d8870e96fd1c7b7281d97ad63ad8300997bb8e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6174746a6d6174746a2f796f2d636c69656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mattjmattj/yo-client/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/18e3f780b3ba70607fcc00811c0c7557eb0e128ca755752877058248aefee428/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6174746a6d6174746a2f796f2d636c69656e742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mattjmattj/yo-client/?branch=master)

Rationale
---------

[](#rationale)

There are several Yo API wrapper available for PHP, but none of them are satisfying to me.

First I wanted to find an implementation that was compatible with composer and PSR-4 autoloading. If you don't care about that, you might be interested in this very lightweight implementation : .

I also wanted to avoid any subsidiary dependency. That's why didn't do the trick for me, but if you don't care about dependencies then this repo is definitely worth a try.

One last thing : I was not sure whether or not I was right to hate PSR-2 conventions, so I had to find an excuse to try and follow them. So the code here is PSR-2 compliant... and I really don't like that.

Install
-------

[](#install)

with composer

```
composer.phar require mattjmattj/yo-client

```

Usage
-----

[](#usage)

One of the main goal was **no dependencies / maximum interoperability**. This means that, to use yo-client, you will have to implement an adapter to your favorite HTTP client, since none is provided. To do that you need to create a class that implements `Yo\HTTP\Client`. This interface is pretty straightforward since it only has one method:

```
public function post(\Yo\HTTP\Request $request) : \Yo\HTTP\Response
```

As long as you know how to send a POST request and return the response you're done. (Actually if you really need an already done adapter, a very light implementation based on curl is provided with yo-client, for testing purpose only).

The second thing you need is an API token. You can grab one in your Yo dashboard : .

Now that the hard part is complete, just :

```
// no : you should not use that one, but...
$http = new \Yo\HTTP\Client\LightCurl();
$api_token = '12345-67890-12345-345678';

$yo = new \Yo\Client($http, $api_token);

// you're done. You can Yo me right now :
$yo->yo('MATTJMATTJ');

// or maybe you want to Yo all your subscribers
$yo->yoAll();

// or Yo me a link to an amazing github repo
$yo->yo('MATTJMATTJ', new \Yo\Link('https://github.com/mattjmattj/yo-client'));

// or Yo me your location
$lat = 12.345;
$long = 67.891;

$yo->yo('MATTJMATTJ', new \Yo\Location($lat, $long);
```

The Yo client will return Yo API response encapsulated into a `Yo\HTTP\Response`.

Contributing
------------

[](#contributing)

You don't really want to do that, do you?

Every contribution is welcome, particularly if you have implemented an HTTP client adapter and want to share it.

The source code if delivered with a makefile that performs some checks, like syntax check or PSR-2 standards compliance. Make sure you run `make all` before submitting a pull request.

Next (roadmap)
--------------

[](#next-roadmap)

Currently only sending Yos is available. We will implement the rest of Yo's API in the future.

License
-------

[](#license)

Yo-client is licensed under BSD-2-Clause.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

4057d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f3dcd17447ceec1afbedb4b996b0365645feb858ebb7c9d161566343faaeb66d?d=identicon)[mattjmattj](/maintainers/mattjmattj)

---

Top Contributors

[![mattjmattj](https://avatars.githubusercontent.com/u/1842012?v=4)](https://github.com/mattjmattj "mattjmattj (8 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/mattjmattj-yo-client/health.svg)

```
[![Health](https://phpackages.com/badges/mattjmattj-yo-client/health.svg)](https://phpackages.com/packages/mattjmattj-yo-client)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
