Introduction
OverblogEmbedlyBundle is a simple Symfony bundle that provides access
to the embed.ly php library (https://github.com/embedly/embedly-php)
See http://embed.ly for more information
Installation
Add this bundle and the embedly-php library to your
vendor/dir:Using the vendors script.
Add the following lines in your
depsfile::[OverblogEmbedlyBundle] git=git://github.com/ebuzzing/OverblogEmbedlyBundle.git target=/bundles/Overblog/EmbedlyBundle [embedly-php] git=git://github.com/embedly/embedly-php.git target=/embedly-phpRun the vendors script:
./bin/vendors install
* Using git submodules.
$ git submodule add git=git://github.com/ebuzzing/OverblogEmbedlyBundle.git vendor/bundles/Overblog/EmbedlyBundle
$ git submodule add git://github.com/embedly/embedly-php.git vendor/embedly-php
- Add the Overblog namespace to your autoloader:
// app/autoload.php
$loader->registerNamespaces(array(
'Overblog' => __DIR__.'/../vendor/bundles',
'Embedly' => __DIR__.'/../vendor/embedly-php/src'
// your other namespaces
));
- Add this bundle to your application's kernel:
// app/ApplicationKernel.php
public function registerBundles()
{
return array(
// ...
new Overblog\EmbedlyBundle\OverblogEmbedlyBundle(),
// ...
);
}
- Configure the
overblog_embedlyservice in your config:
overblog_embedly:
config:
key: your_api_key
Example
In a controller, do the following:
$embedly = $this->get('overblog_embedly');
$oembedResponse = $embedly->get('http://about.over-blog.com/article-participez-a-la-conception-de-la-prochaine-version-d-overblog-91418456.html');
/*
object(stdClass)[1251]
public 'provider_url' => string 'http://about.over-blog.com/' (length=27)
public 'description' => string 'Mardi 6 décembre 2011 2 06 /12 /Déc /2011 12:44 Dans les mois à venir, nous allons développer une version complètement nouvelle d'OverBlog. La nouvelle version remplacera l'actuelle plateforme, elle sera plus fonctionnelle, plus simple et vos blogs actuels en bénéficieront automatiquement !' (length=298)
public 'title' => string 'Participez à la conception de la prochaine version d'OverBlog !' (length=64)
public 'url' => string 'http://about.over-blog.com/article-participez-a-la-conception-de-la-prochaine-version-d-overblog-91418456.html' (length=110)
public 'thumbnail_width' => int 439
public 'thumbnail_url' => string 'http://idata.over-blog.com/0/00/63/43/perenoel.jpg' (length=50)
public 'version' => string '1.0' (length=3)
public 'provider_name' => string 'Over-blog' (length=9)
public 'type' => string 'link' (length=4)
public 'thumbnail_height' => int 269
*/
Copyright (c) 2011 Overblog
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
overblog_embedly:
config:
key: ~
-
Update DependencyInjection/Configuration.php
By xkobal, 5 months ago
-
Update DependencyInjection/Configuration.php
By xkobal, 5 months ago
-
Update DependencyInjection/Configuration.php
By xkobal, 5 months ago
-
Update DependencyInjection/Configuration.php
By xkobal, 5 months ago
-
Update DependencyInjection/Configuration.php
By xkobal, 5 months ago
-
Update DependencyInjection/Configuration.php
By xkobal, 5 months ago
-
Update DependencyInjection/Configuration.php
By xkobal, 5 months ago
-
Update DependencyInjection/Configuration.php
By xkobal, 5 months ago
-
Update DependencyInjection/Configuration.php
By xkobal, 5 months ago
-
Update DependencyInjection/Configuration.php
By xkobal, 5 months ago
-
Update composer.json
By xkobal, 5 months ago
-
Update composer.json
By xkobal, 5 months ago
-
Update composer.json
By xkobal, 5 months ago
-
Update composer.json
By xkobal, 5 months ago
-
Update composer.json
By xkobal, 5 months ago
-
Update composer.json
By xkobal, 5 months ago
-
Update composer.json
By xkobal, 5 months ago
-
Update composer.json
By xkobal, 5 months ago
-
Update composer.json
By xkobal, 5 months ago
-
Update composer.json
By xkobal, 5 months ago
-
Add composer.json for SF 2.1
By xkobal, 6 months ago
-
Add composer.json for SF 2.1
By xkobal, 6 months ago
-
Add composer.json for SF 2.1
By xkobal, 6 months ago
-
Add composer.json for SF 2.1
By xkobal, 6 months ago
-
Add composer.json for SF 2.1
By xkobal, 6 months ago
-
Add composer.json for SF 2.1
By xkobal, 6 months ago
-
Add composer.json for SF 2.1
By xkobal, 6 months ago
-
Add composer.json for SF 2.1
By xkobal, 6 months ago
-
Add composer.json for SF 2.1
By xkobal, 6 months ago
-
Add composer.json for SF 2.1
By xkobal, 6 months ago
