8000 GitHub - clue/reactphp-packagist-api at v0.1.0
[go: up one dir, main page]

Skip to content
8000

Simple async access to packagist.org's API, like listing project details, number of downloads etc., built on top of ReactPHP.

License

Notifications You must be signed in to change notification settings

clue/reactphp-packagist-api

Repository files navigation

clue/packagist-api-react Build Status

Simple async access to packagist.org's API, like listing project details, number of downloads, etc.

This is an async version of KnpLab's excellent packagist-api, but built upon React PHP's non-blocking event-loop. It uses the async HTTP client library buzz-react to process any number of requests in parallel.

In a nutshell, it allows you to issue multiple requests to the packagist API in parallel and process them out of order whenever their results arrive - while trying to hide all the nifty details of async processing. On top of that it provides a very easy to use API, very much similar to the original packagist-api, enriched with the comfort of React PHP's Promises/A.

Note: This project is in beta stage! Feel free to report any issues you encounter.

Quickstart example

Once installed, you can use the following code to fetch package information from packagist.org:

$client = new Client($browser);

$client->get('clue/phar-composer')->then(function (Package $package) {
    var_dump($package->getName(), $package->getDescription());
});

Install

The recommended way to install this library is through composer. New to composer?

{
    "require": {
        "clue/packagist-api-react": "~0.1.0"
    }
}

License

MIT

About

Simple async access to packagist.org's API, like listing project details, number of downloads etc., built on top of ReactPHP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

0