Skip to content

Commit

Permalink
changed documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Apr 5, 2014
1 parent d9c352d commit c6f4ef3
Showing 1 changed file with 29 additions and 22 deletions.
51 changes: 29 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,32 @@ Usage:
include('Embed/autoloader.php');

//Load any url:
$Url = new Embed\Url('https://www.youtube.com/watch?v=PP1xn5wHtxE');
$Info = Embed\Embed::create($Url);
$info = Embed\Embed::create('https://www.youtube.com/watch?v=PP1xn5wHtxE');

//Get content info

$Info->title;
$Info->description;
$Info->url;
$Info->type;
$info->title;
$info->description;
$info->url;
$info->type;

$Info->images;
$Info->image;
$Info->imageWidth;
$Info->imageHeight;
$info->images;
$info->image;
$info->imageWidth;
$info->imageHeight;

$Info->code;
$Info->width;
$Info->height;
$Info->aspectRatio;
$info->code;
$info->width;
$info->height;
$info->aspectRatio;

$Info->authorName;
$Info->authorUrl;
$info->authorName;
$info->authorUrl;

$Info->providerIcons;
$Info->providerIcon;
$Info->providerName;
$Info->providerUrl;
$info->providerIcons;
$info->providerIcon;
$info->providerName;
$info->providerUrl;
```

Available options
Expand All @@ -65,9 +64,17 @@ $options = array(
'getBiggerImage' => true
);

$Url = new Embed\Url('https://www.youtube.com/watch?v=PP1xn5wHtxE');
$info = Embed\Embed::create('https://www.youtube.com/watch?v=PP1xn5wHtxE', $options);
```

Customize the request
---------------------

$Info = Embed\Embed::create($Url, $options);
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.

```php
//Configure the request resolver class:
Embed\Request::setDefaultResolver('MyCustomResolverClass');
```


Expand Down

0 comments on commit c6f4ef3

Please sign in to comment.