update to PHP-8.1
[m6w6/seekat] / README.md
index 9dccecd00eacdd20a1f9616f45f3d055c52dc885..ffee664fe49f701e54b97247c19026e3550a9532 100644 (file)
--- a/README.md
+++ b/README.md
@@ -2,7 +2,14 @@
 
 [![Build Status](https://travis-ci.org/m6w6/seekat.svg)](https://travis-ci.org/m6w6/seekat)
 
 
 [![Build Status](https://travis-ci.org/m6w6/seekat.svg)](https://travis-ci.org/m6w6/seekat)
 
-Fluent Github API access with PHP-7 and [ext-http](https://github.com/m6w6/ext-http).
+Fluent Github API access with [ext-http](https://github.com/m6w6/ext-http).
+
+Support for the following promise providers built in:
+ * [ReactPHP](https://github.com/reactphp/promise)
+ * [AmPHP](https://github.com/amphp/amp)
+
+Supports plugging into your favourite event loop through
+[http\Client's custom event loop interface](https://mdref.m6w6.name/http/Client/Curl/User).
 
 Simple example:
 
 
 Simple example:
 
@@ -11,7 +18,7 @@ Simple example:
 
 use seekat\API;
 
 
 use seekat\API;
 
-$api = new API;
+$api = new API(API\Future\react());
 
 $api->repos->m6w6->seekat->readme->as("html")->then(function($readme) {
        echo $readme;
 
 $api->repos->m6w6->seekat->readme->as("html")->then(function($readme) {
        echo $readme;
@@ -30,6 +37,7 @@ Full example:
 require_once __DIR__."/../vendor/autoload.php";
 
 use seekat\API;
 require_once __DIR__."/../vendor/autoload.php";
 
 use seekat\API;
+use function seekat\API\Links\next;
 
 $cli = new http\Client("curl", "seekat");
 $cli->configure([
 
 $cli = new http\Client("curl", "seekat");
 $cli->configure([
@@ -38,9 +46,9 @@ $cli->configure([
 ]);
 
 $log = new Monolog\Logger("seekat");
 ]);
 
 $log = new Monolog\Logger("seekat");
-$log->pushHandler((new Monolog\Handler\StreamHandler(STDERR))->setLevel(Monolog\Logger::WARNING));
+$log->pushHandler(new Monolog\Handler\StreamHandler(STDERR, Monolog\Logger::WARNING));
 
 
-$api = new API([
+$api = new API(API\Future\react(), [
        "Authorization" => "token ".getenv("GITHUB_TOKEN")
 ], null, $cli, $log);
 
        "Authorization" => "token ".getenv("GITHUB_TOKEN")
 ], null, $cli, $log);
 
@@ -50,7 +58,7 @@ $api(function($api) {
                "affiliation" => "owner"
        ]);
        while ($repos) {
                "affiliation" => "owner"
        ]);
        while ($repos) {
-               $next = $repos->next();
+               $next = next($repos);
 
                $batch = [];
                foreach ($repos as $repo) {
 
                $batch = [];
                foreach ($repos as $repo) {
@@ -76,9 +84,6 @@ $api(function($api) {
 ```
 
 
 ```
 
 
-> ***Note:*** WIP
-
-
 ## Installing
 
 ### Composer
 ## Installing
 
 ### Composer