dsawardekar / imgur-api
PHP 中使用 Imgur API 的库
0.4.1
2014-06-28 10:50 UTC
Requires
- dsawardekar/encase-php: ~0.2.0
- rmccue/requests: >=1.0
Requires (Dev)
- phpunit/phpunit: ~3.7.0
This package is not auto-updated.
Last update: 2024-09-14 15:06:08 UTC
README
PHP 库,用于使用 Imgur API。
使用方法
<?php $container ->singleton('imgurCredentials', 'Imgur\Credentials') ->singleton('imgurAdapter', 'Imgur\Adapter') ->singleton('imgurImageRepo', 'Imgur\ImageRepo'); $imageRepo = $container->lookup('imgurImageRepo'); $image = $imageRepo->create( array( 'image' => 'http://path/to/image', 'title' => 'My Image' ) ); echo $image['link'];
系统需求
- PHP 5.3.3+
许可证
MIT 许可证。版权 © 2014 Darshan Sawardekar