polianych/media-net-api
Composer 安装命令:
composer require polianych/media-net-api
包简介
MediaNet API support for ZF2 application
关键字:
README 文档
README
MediaNet API support for ZF2 application Introduction
This module currently supports the following calls with API version [2011-10-07]
- track.get
- track.getLocations
- search.getGeoLocation
- purchase.useBalance
- Radio.GetMediaLocation
Please see: API Docs
Requirements
- PHP 5.3.3+
- Zend Framework 2 (latest master)
Contributors
- [Alexey Poliakov] (https://github.com/polianych) (aka polianych)
Install
- Add
"polianych/media-net-api": "dev-master"
to your composer.json file and run php composer.phar update. - Add 'MediaNetApi' to your config/application.config.php file under the modules key.
Configuration
Add this section to your application config
...
'medianet_api' => array(
'base_url' => 'https://api.mndigital.com',
'api_key' => 'wsQdZA8EDdruT4CV62Fi48JSl',
'secret' => 'PLJuvKAoi65',
'format' => 'json', //Currently supports only JSON format
'cc' => 'gb',
),
...
Example Usage
Retrieve by MediaNetID (mnetid) the metadata about a specific track, including artist and album info, etc.
$mediaNet = $this->getServiceLocator()->get('MediaNetApi');
$request = new MediaNetApi\Request\Track\Get();
$request->setMnetId($mnetId);
//Returns ArrayObject of MediaNet API response or Zend Response if second param true
$result = $mediaNet->send($request);
统计信息
- 总下载量: 261
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-03-13