Skip to content

Commit 13595f0

Browse files
committed
updated docs
1 parent 8d5f073 commit 13595f0

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Embed
22
=====
33

4-
[![Build Status](https://travis-ci.org/oscarotero/Embed.png?branch=v1.3.3)](https://travis-ci.org/oscarotero/Embed)
4+
[![Build Status](https://travis-ci.org/oscarotero/Embed.svg?branch=master)](https://travis-ci.org/oscarotero/Embed)
55
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/oscarotero/Embed/badges/quality-score.png?s=79e37032db280b9795388124c030dcf4309343d1)](https://scrutinizer-ci.com/g/oscarotero/Embed/)
66

77
PHP library to get info and embed any web page (using oembed, opengraph, twitter-cards, etc). It's compatible with any web service (youtube, vimeo, flickr, instagram, etc).
@@ -24,28 +24,28 @@ $info = Embed\Embed::create('https://www.youtube.com/watch?v=PP1xn5wHtxE');
2424

2525
//Get content info
2626

27-
$info->title;
28-
$info->description;
29-
$info->url;
30-
$info->type;
27+
$info->title; //The page title
28+
$info->description; //The page description
29+
$info->url; //The canonical url
30+
$info->type; //The page type (link, video, image, rich)
3131

32-
$info->images;
33-
$info->image;
34-
$info->imageWidth;
35-
$info->imageHeight;
32+
$info->images; //List of all images found in the page
33+
$info->image; //The image choosen as main image
34+
$info->imageWidth; //The with of the main image
35+
$info->imageHeight; //The height of the main image
3636

37-
$info->code;
38-
$info->width;
39-
$info->height;
40-
$info->aspectRatio;
37+
$info->code; //The code to embed the image, video, etc
38+
$info->width; //The with of the embed code
39+
$info->height; //The height of the embed code
40+
$info->aspectRatio; //The aspect ratio (width/height)
4141

42-
$info->authorName;
43-
$info->authorUrl;
42+
$info->authorName; //The (video/article/image/whatever) author
43+
$info->authorUrl; //The author url
4444

45-
$info->providerIcons;
46-
$info->providerIcon;
47-
$info->providerName;
48-
$info->providerUrl;
45+
$info->providerName; //The provider name of the page (youtube, twitter, instagram, etc)
46+
$info->providerUrl; //The provider url
47+
$info->providerIcons; //All provider icons found in the page
48+
$info->providerIcon; //The icon choosen as main icon
4949
```
5050

5151
Available options
@@ -59,7 +59,7 @@ Available options
5959
* soundcloudClientId (string): Used to get info of links from soundcloud. By default, it uses "YOUR_CLIENT_ID" that its a valid client id :P
6060
* embedlyKey (string): If it's defined, get info from embedly service (only for know supported services and if the page doesn't have its own oembed service)
6161
* oembedParameters (array): Extra GET parameters to the oembed requests.
62-
* ignoreFacebookProvider (bool): If it's true, the facebook provider won't be used. This reduces the number of requests and prevent some false values (the facebook scrapping is not perfect).
62+
* facebookProvider (bool): If it's true, the facebook provider will be used to get the page information, that uses the facebook scrapping. By default is false because reduce the number of requests and facebook scrapping not always returns right results.
6363

6464
```php
6565
$options = array(
@@ -75,11 +75,11 @@ Customize the request
7575
Embed provides a RequestResolvers\Curl class to resolve all requests using the curl library. You can create your own request resolver class creating a class implementing the RequestResolverInterface.
7676

7777
```php
78-
//Configure the request resolver class:
78+
//Set your own request resolver class:
7979
Embed\Request::setDefaultResolver('MyCustomResolverClass');
8080
```
8181

82-
You can configure also the following options of the request resolver:
82+
You can configure also the following options of the default request resolver:
8383

8484
* user_agent: User agent used in all requests. By default is "Embed PHP Library"
8585
* max_redirections: The maximum amount of HTTP redirections to follow. By default is 20

0 commit comments

Comments
 (0)