Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit c6a54fd

Browse files
authored
Merge pull request #7 from findbrok/master
Pimped up README
2 parents 0ded1ae + 1fabdc2 commit c6a54fd

File tree

1 file changed

+34
-30
lines changed

1 file changed

+34
-30
lines changed

README.md

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
1-
# PHP IBM Watson API Bridge
2-
3-
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/4e21093a-cc60-4a75-b7fe-cb29053faf6c/big.png)](https://insight.sensiolabs.com/projects/4e21093a-cc60-4a75-b7fe-cb29053faf6c)
4-
5-
[![StyleCI](https://styleci.io/repos/59507474/shield?style=flat)](https://styleci.io/repos/59507474)
6-
[![Build Status](https://travis-ci.org/findbrok/php-watson-api-bridge.svg?branch=master)](https://travis-ci.org/findbrok/php-watson-api-bridge)
7-
[![Latest Stable Version](https://poser.pugx.org/findbrok/php-watson-api-bridge/v/stable)](https://packagist.org/packages/findbrok/php-watson-api-bridge)
8-
[![Total Downloads](https://poser.pugx.org/findbrok/php-watson-api-bridge/downloads)](https://packagist.org/packages/findbrok/php-watson-api-bridge)
9-
[![Latest Unstable Version](https://poser.pugx.org/findbrok/php-watson-api-bridge/v/unstable)](https://packagist.org/packages/findbrok/php-watson-api-bridge)
10-
[![License](https://poser.pugx.org/findbrok/php-watson-api-bridge/license)](https://packagist.org/packages/findbrok/php-watson-api-bridge)
11-
12-
A simple PHP wrapper for IBM Watson API
1+
<p align="center">
2+
<img src="https://raw.githubusercontent.com/findbrok/art-work/master/packages/php-watson-api-bridge/php-watson-api-bridge.png">
3+
</p>
4+
<h2 align="center">
5+
PHP IBM Watson API Bridge
6+
</h2>
7+
8+
<p align="center">
9+
<a href="https://packagist.org/packages/findbrok/php-watson-api-bridge"><img src="https://poser.pugx.org/findbrok/php-watson-api-bridge/v/stable" alt="Latest Stable Version"></a>
10+
<a href="https://packagist.org/packages/findbrok/php-watson-api-bridge"><img src="https://poser.pugx.org/findbrok/php-watson-api-bridge/v/unstable" alt="Latest Unstable Version"></a>
11+
<a href="https://travis-ci.org/findbrok/php-watson-api-bridge"><img src="https://travis-ci.org/findbrok/php-watson-api-bridge.svg?branch=1.1" alt="Build Status"></a>
12+
<a href="https://styleci.io/repos/59507474"><img src="https://styleci.io/repos/59507474/shield?branch=1.1" alt="StyleCI"></a>
13+
<a href="https://packagist.org/packages/findbrok/php-watson-api-bridge"><img src="https://poser.pugx.org/findbrok/php-watson-api-bridge/license" alt="License"></a>
14+
<a href="https://packagist.org/packages/findbrok/php-watson-api-bridge"><img src="https://poser.pugx.org/findbrok/php-watson-api-bridge/downloads" alt="Total Downloads"></a>
15+
<a href="https://insight.sensiolabs.com/projects/4e21093a-cc60-4a75-b7fe-cb29053faf6c" alt="medal"><img src="https://insight.sensiolabs.com/projects/4e21093a-cc60-4a75-b7fe-cb29053faf6c/mini.png"></a>
16+
</p>
17+
18+
## Introduction
19+
PHP IBM Watson API Bridge, provides a simple and easy to use wrapper around the IBM Watson API. The library makes it easier for us to
20+
develop PHP apps that use the IBM Watson API.
21+
22+
## License
23+
PHP IBM Watson API Bridge is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
1324

1425
### Installation
15-
16-
```
17-
composer require findbrok/php-watson-api-bridge
26+
```bash
27+
$ composer require findbrok/php-watson-api-bridge
1828
```
1929

2030
### Usage
21-
2231
Before using the package checkout [Watson API Explorer](https://watson-api-explorer.mybluemix.net/),
2332
to get a sense of what you can and cannot do with Watson
2433

@@ -44,10 +53,9 @@ all your responses will be instances of ```GuzzleHttp\Psr7\Response```
4453

4554
---
4655
### Integration with Laravel 5
47-
4856
As of version 1.1.x, PHP Watson API bridge adds a new Service Provider which integrates easily with Laravel 5.
4957

50-
First add the ServiceProvider to your ```app.php``` file.
58+
First add the ServiceProvider to your ```app.php``` file:
5159

5260
```php
5361
'providers' => [
@@ -56,33 +64,29 @@ First add the ServiceProvider to your ```app.php``` file.
5664
]
5765
```
5866

59-
Now publish the config file.
67+
Now publish the config file:
6068

61-
```php
69+
```bash
6270
$ php artisan vendor:publish --tag=watson-api-bridge
6371
```
6472

6573
You will now have a config file ```watson-bridge.php``` in your config directory.
66-
You may define in this config file your credentials, auth method to use,
67-
Watson Services and so on.
74+
You may define in this config file your credentials, auth method to use, Watson Services and so on.
6875

6976
### Services
70-
7177
The Laravel Integration gives you 3 service classes that are bound to the IoC.
7278
- FindBrok\WatsonBridge\Bridge (The actual Bridge class for making requests to Watson)
7379
- FindBrok\WatsonBridge\Support\Carpenter (Which can construct Bridge instances using your credentials and service URL)
7480
- FindBrok\WatsonBridge\Support\BridgeStack (Essentially a store where you can keep all Bridges you constructed and retrieve them back.)
7581

7682
### Bridge
77-
78-
```Bridge``` class will help you make requests to Watson API using the ```get```, ```post```, ```put```, ```patch``` methods
83+
```Bridge``` class will help you make requests to Watson API using the ```get```, ```post```, ```put```, ```patch``` methods:
7984

8085
```php
8186
$response = $bridge->get('uri', $queryParams);
8287
```
8388

8489
### Carpenter
85-
8690
The ```Carpenter``` class can build any type of Bridge for you. Use the ```constructBridge``` method passing in the desired parameters like
8791
credentials name, service to use and auth method and so on and the ```Carpenter``` will.
8892

@@ -95,7 +99,6 @@ $bridge = $carpenter->constructBridge('default', 'personality_insights');
9599
Remember that your credentials names, services and auth methods are all defined in the ```watson-bridge.php``` config file.
96100

97101
### BridgeStack
98-
99102
The ```BridgeStack``` is a great place to keep all your Bridges so that you can retrieve them anytime in your app.
100103
Use the ```mountBridge``` method to construct and keep any type of Bridge in the Stack.
101104

@@ -111,7 +114,6 @@ $response = $stack->conjure('myPIBridge')->post('/v3/profile', $dataToPost);
111114
The ```BridgeStack``` is essentially a Laravel Collection, thus you have access to all Collection methods.
112115

113116
### Facades
114-
115117
If you are using Laravel version less than 5.4 you have access to 3 Facades for the 3 services Bridge, Carpenter and BridgeStack.
116118
Since Laravel 5.4 added automatic Facades you won't be needing those classes.
117119

@@ -122,9 +124,11 @@ Since Laravel 5.4 added automatic Facades you won't be needing those classes.
122124
Remember that if you are resolving the Bridge directly from the IoC and not constructing it with the Carpenter class a default Bridge will
123125
be resolved for you using the default credentials and auth methods from your watson-bridge config.
124126

125-
## Credits
127+
### Credits
128+
Big Thanks to all developers who worked hard to create something amazing!
126129

127-
[![Percy Mamedy](https://img.shields.io/badge/Author-Percy%20Mamedy-orange.svg)](https://twitter.com/PercyMamedy)
130+
### Creator
131+
[![Percy Mamedy](https://img.shields.io/badge/Author-Percy%20Mamedy-orange.svg)](https://twitter.com/PercyMamedy)
128132

129133
Twitter: [@PercyMamedy](https://twitter.com/PercyMamedy)
130134
<br/>

0 commit comments

Comments
 (0)