Skip to content

Commit bd64a89

Browse files
committed
Updated readme
1 parent b6abafc commit bd64a89

File tree

1 file changed

+8
-27
lines changed

1 file changed

+8
-27
lines changed

README.md

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,17 @@
1-
# API Client Foundation for PHP 7.x
1+
# JSON tools for API Clients for PHP 7.x
22

3-
[![Build Status](https://travis-ci.org/php-api-clients/foundation.svg?branch=master)](https://travis-ci.org/php-api-clients/foundation)
4-
[![Latest Stable Version](https://poser.pugx.org/api-clients/foundation/v/stable.png)](https://packagist.org/packages/api-clients/foundation)
5-
[![Total Downloads](https://poser.pugx.org/api-clients/foundation/downloads.png)](https://packagist.org/packages/api-clients/foundation/stats)
6-
[![Code Coverage](https://scrutinizer-ci.com/g/php-api-clients/foundation/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/php-api-clients/foundation/?branch=master)
7-
[![License](https://poser.pugx.org/api-clients/foundation/license.png)](https://packagist.org/packages/api-clients/foundation)
8-
[![PHP 7 ready](http://php7ready.timesplinter.ch/php-api-clients/foundation/badge.svg)](https://appveyor-ci.org/php-api-clients/foundation)
9-
10-
# Middleware
11-
12-
Middlewares are passed into the client with the options argument. In this example the [`api-clients/middleware-delay`](https://github.com/php-api-clients/middleware-delay) is used. Adding middlewares to the client is simple, add an array to `$options` with `Options::MIDDLEWARE` as index cosisting of middleware class names. Optionally you can pass options for the middleware through the `$options` array. Simply add a new array inside the array with the middlware class name as index and pass the desired options into it.
13-
14-
```php
15-
$options = [
16-
Options::DEFAULT_REQUEST_OPTIONS => [
17-
\ApiClients\Middleware\Delay\DelayMiddleware::class => [
18-
\ApiClients\Middleware\Delay\Options::DELAY => 3,
19-
],
20-
],
21-
Options::MIDDLEWARE => [
22-
\ApiClients\Middleware\Delay\DelayMiddleware::class,
23-
],
24-
];
25-
26-
$client = new Client($loop, $container, $browser, $options);
27-
```
3+
[![Build Status](https://travis-ci.org/php-api-clients/json.svg?branch=master)](https://travis-ci.org/php-api-clients/json)
4+
[![Latest Stable Version](https://poser.pugx.org/api-clients/json/v/stable.png)](https://packagist.org/packages/api-clients/json)
5+
[![Total Downloads](https://poser.pugx.org/api-clients/json/downloads.png)](https://packagist.org/packages/api-clients/json/stats)
6+
[![Code Coverage](https://scrutinizer-ci.com/g/php-api-clients/json/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/php-api-clients/json/?branch=master)
7+
[![License](https://poser.pugx.org/api-clients/json/license.png)](https://packagist.org/packages/api-clients/json)
8+
[![PHP 7 ready](http://php7ready.timesplinter.ch/php-api-clients/json/badge.svg)](https://appveyor-ci.org/php-api-clients/json)
289

2910
# License
3011

3112
The MIT License (MIT)
3213

33-
Copyright (c) 2016 Cees-Jan Kiewiet
14+
Copyright (c) 2017 Cees-Jan Kiewiet
3415

3516
Permission is hereby granted, free of charge, to any person obtaining a copy
3617
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)