embedly/embedly-php
Composer 安装命令:
composer require embedly/embedly-php
包简介
Embedly library for PHP
关键字:
README 文档
README
A PHP library for using the Embedly API. To find out what Embedly is all about, please visit http://embed.ly. To see our api documentation, visit http://api.embed.ly/docs.
Requirements
You will need at least PHP version 5.3 with curl enabled. Behat and PHPUnit are required to run the test suite. Pear is recommended.
Installing
To install:
1. Download the composer.phar executable or use the installer.
curl -sS https://getcomposer.org/installer | php
2. Install this package with comopser:
``php composer.phar require embedly/embedly-php``
Examples
<?php
require_once('Embedly/src/Embedly/Embedly.php'); // if using pear
// require_once('src/Embedly/Embedly.php'); // if using source
// require_once(__DIR__ . '/vendor/autoload.php'); // if using Composer
$api = new Embedly\Embedly(array('user_agent' => 'Mozilla/5.0 (compatible; mytestapp/1.0)'));
// Single url
$objs = $api->oembed('http://www.youtube.com/watch?v=sPbJ4Z5D-n4&feature=topvideos');
print_r($objs);
// Multiple urls
$obj = $api->oembed(array(
'urls' => array(
'http://www.youtube.com/watch?v=sPbJ4Z5D-n4&feature=topvideos',
'http://twitpic.com/3yr7hk'
)
));
print_r($obj);
// Call with pro (you'll need a real key)
$pro = new Embedly\Embedly(array(
'key' => 'xxxxxxxxxxxxxxxx',
'user_agent' => 'Mozilla/5.0 (compatible; mytestapp/1.0)'
));
$objs = $pro->extract(array(
'urls' => array(
'http://www.guardian.co.uk/media/2011/jan/21/andy-coulson-phone-hacking-statement',
'http://hn.embed.ly'
)
));
print_r($objs);
Development
git clone git://github.com/embedly/embedly-php.git curl -sS https://getcomposer.org/installer | php php composer.phar install export EMBEDLY_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxx bin/behat
Note on Patches/Pull Requests
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a future version unintentionally.
- Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
- Send me a pull request. Bonus points for topic branches.
Copyright
Copyright (c) 2011 Embed.ly, Inc. See MIT-LICENSE for details.
embedly/embedly-php 适用场景与选型建议
embedly/embedly-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.93M 次下载、GitHub Stars 达 97, 最近一次更新时间为 2012 年 11 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「embedly」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 embedly/embedly-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 embedly/embedly-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 embedly/embedly-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP library to retrieve page info using oembed, opengraph, etc
Bridge bundle for the embedly api. Defines a service and configuration for the official embedly library
Library for embed.ly APIs
Symfony 2 Bundle for the embed.ly library
A Laravel 5.* package for the Embedly api
Symfony2 Embedly Bundle
统计信息
- 总下载量: 1.93M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 98
- 点击次数: 13
- 依赖项目数: 9
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2012-11-15