stegeman / embedly-bundle
embedly api 的桥梁包。定义了官方 embedly 库的服务和配置
1.0.3
2014-06-17 14:02 UTC
Requires
- php: >=5.3.0
- embedly/embedly-php: v0.5.4
This package is auto-updated.
Last update: 2024-09-05 15:51:52 UTC
README
此包仅使用 embed.ly 提供的官方 embedly api。它为你提供了一个名为 'stegeman_embedly.api' 的服务。
安装
使用 Composer,将其添加到 composer.json
{
"require": {
"stegeman/embedly-bundle": "dev-master"
}
}
然后使用 composer 进行安装
php composer.phar update stegeman/embedly-bundle
在 /app/AppKernel.php 中注册此包
<?php
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Stegeman\EmbedlyBundle\StegemanEmbedlyBundle()
);
}
}
配置
此包有四个配置选项:唯一必需的选项是 embedly 提供的密钥。
# in config.yml
stegeman_embedly:
args:
key: 9cddb3ccb4c5418387e59411693f5afd # required
hostname: api.embed.ly # Optional
api_version: # optional
oembed: 1
objectify: 2
preview: 1
extract: 1
user_agent: Mozilla/5.0 (compatible; embedly-php/%s) #optional