@@ -12,7 +12,7 @@ by Mohammad Najafian
1212 php artisan vendor:publish
1313 ```
1414 # Config
15- Open ``` lmfa.php ``` in config folder in laravel root then you can enter you'r `` api_key `` in this file !
15+ 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 : :
@@ -21,62 +21,62 @@ by Mohammad Najafian
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+ ```
2525 $face->setUrl($url);
26- ````
26+ ```
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+ ```
3030 $face->setMethod("post");
31- ````
31+ ```
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+ ```
3636 $face->getApiKey();
37- ````
38- ````
37+ ```
38+ ```
3939 $face->setHeaders(array(
4040 'Content-Type' => 'application/json',
4141 'Ocp-Apim-Subscription-Key' => $face->getApiKey(),
4242 ));
43- ````
43+ ```
4444 ##### 5 . Set Parameters :100 : :
4545To this step we can set the Parameters :
46- ````
46+ ```
4747 $face->setParameters(array(
4848 'returnFaceId' => 'true', // Recommended : True
4949 'returnFaceLandmarks' => 'false', // Very information about face sizes
5050 'returnFaceAttributes' => 'age,gender,glasses,smile,noise,hair,accessories,emotion,makeup', // Your Requsted info
5151 ));
52- ````
52+ ```
5353######You can set these in the returnFaceAttributes in parameters
5454Some Face Attributes : age , gender , glasses , smile , noise , hair , accessories , emotion , makeup ...
5555//
5656##### 6 . Set image :100 : :
5757######Then , we need to set image :-) :
5858We must to put image URL in the array Like This.
59- ````
59+ ```
6060 $image = array(
6161 'url' => 'http://cdn-tehran.wisgoon.com/dlir-s3/10531466806488528869.JPG',
6262 );
6363 $face->setBody($image,true); // Set Image
6464
65- ````
65+ ```
6666##### 7 . Check Request to complete set :100 : :
6767We must to Check Before ``` $face->send() ``` .
68- ````
68+ ```
6969 $face->check();
7070 $face->send();
71- ````
71+ ```
7272##### 8 . Get Face Information in JSON :100 : :
7373Do This :
74- ````
74+ ```
7575 $face->check();
7676 $result = $face->send();
7777 // Now JSON in $result
7878 return $result;
79- ````
79+ ```
8080# Finish And a Example:
8181
8282
0 commit comments