Skip to content

Commit 3ea3453

Browse files
Readme Update 🆎
1 parent ec9a4c5 commit 3ea3453

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,47 @@ This Package Help You To Connect To Microsoft Face APi
33
by Mohammad Najafian
44
# Installation
55
#### install With Composer
6-
```
6+
```php
77
composer require ikosar/lmfa
88
```
99
#### After :
1010

11-
```
11+
```php
1212
php artisan vendor:publish
1313
```
1414
# Config
1515
Open ``` lmfa.php ``` in config folder in laravel root then you can enter you'r ``` api_key ``` in this file !
1616
# Usage
1717
## Normal Request (Return To You Face's info)
1818
### 1 . First we need to do this :100: :
19-
```
19+
```php
2020
$face = new CheckFace();
2121
```
2222
### 2 . We Set The Url :
2323
if you want to customize the url , Do this :100: : (default : https://westcentralus.api.cognitive.microsoft.com/face/v1.0/detect)
24-
```
24+
```php
2525
$face->setUrl($url);
2626
```
2727
### 3 . Also Set Request Type ( post , get , delete , put ) :100: :
2828
To this step we set the request's type (only lowercase) :
29-
```
29+
```php
3030
$face->setMethod("post");
3131
```
3232
### 4 . Set Headers :100: :
3333
We Must to set headers to use Microsoft's Face APi (only lowercase) :
3434
##### if you want to put APi_key in Headers or Parameters Use This :
35-
```
35+
```php
3636
$face->getApiKey();
3737
```
38-
```
38+
```php
3939
$face->setHeaders(array(
4040
'Content-Type' => 'application/json',
4141
'Ocp-Apim-Subscription-Key' => $face->getApiKey(),
4242
));
4343
```
4444
### 5 . Set Parameters :100: :
4545
To this step we can set the Parameters :
46-
```
46+
```php
4747
$face->setParameters(array(
4848
'returnFaceId' => 'true', // Recommended : True
4949
'returnFaceLandmarks' => 'false', // Very information about face sizes
@@ -56,22 +56,22 @@ Some Face Attributes : age , gender , glasses , smile , noise , hair , accessori
5656
### 6 . Set image :100: :
5757
Then , we need to set image :-) :
5858
We must to put image URL in the array Like This.
59-
```
59+
```php
6060
$image = array(
6161
'url' => 'http://cdn-tehran.wisgoon.com/dlir-s3/10531466806488528869.JPG',
6262
);
6363
$face->setBody($image,true); // Set Image
6464

6565
```
66-
### 7 . Check Request to complete set :100: :
66+
### 7 . Check Request to complete seted :100: :
6767
We must to Check Before ```$face->send()```.
68-
```
68+
```php
6969
$face->check();
7070
$face->send();
7171
```
7272
### 8 . Get Face Information in JSON :100: :
7373
Do This :
74-
```
74+
```php
7575
$face->check();
7676
$result = $face->send();
7777
// Now JSON in $result
@@ -80,7 +80,7 @@ Do This :
8080
## Finish And a Example:
8181

8282

83-
```
83+
```php
8484
$image = array(
8585
'url' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Donald_Trump_August_19%2C_2015_%28cropped%29.jpg/245px-Donald_Trump_August_19%2C_2015_%28cropped%29.jpg',
8686
);

0 commit comments

Comments
 (0)