Download the PHP package mattjmattj/yo-client without Composer

On this page you can find all versions of the php package mattjmattj/yo-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yo-client

yo-client

Build Status Scrutinizer Code Quality Code Coverage

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 : https://github.com/nanexcool/yo-php.

I also wanted to avoid any subsidiary dependency. That's why https://github.com/toin0u/yo 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

with composer

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:

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 : https://dev.justyo.co/.

Now that the hard part is complete, just :

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

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)

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

License

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


All versions of yo-client with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mattjmattj/yo-client contains the following files

Loading the files please wait ....