承接 marvelley/lastfm-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marvelley/lastfm-api

Composer 安装命令:

composer require marvelley/lastfm-api

包简介

A last.fm API client

关键字:

README 文档

README

This is a client for the last.fm API. It uses the Guzzle web service library. The client API is a custom web service client based on Guzzle\Service\Client.

Build Status

Installation

Use composer to install the library and all its dependencies:

composer require "marvelley/lastfm-api:1.0.*@dev" 

Basic Usage Example

Before you can use the library you have to request your API key on the last.fm API page.
Put that key in the following code and run the code from the command line:

require 'vendor/autoload.php';

use Marvelley\Lastfm\Api\LastfmApiClient;

$l = LastfmApiClient::factory(array('api_key' => 'your_api_key'));
$ai = $l->getCommand('artist.getInfo', array(
	'artist' => 'Elvis Presley', 
	"format" => "json"
));
$result = $ai->execute();
echo "Similar artists:\n";
foreach($result['artist']['similar']['artist'] as $artist) {
	printf("  - %s\n", $artist['name']);
}

## Running integration tests

Before running the test suite you need to configure a specific environment variable with a valid last.fm API key. For example, from your terminal:

$ export LAST_FM_PHP_CLIENT_API_KEY=your_api_key

or add a similar entry to your bash/zsh/whatever config file.

You can then run the test suite via:

$ phpunit

from the root of the project directory (assuming you have PHPUnit installed and on the path).

统计信息

  • 总下载量: 156
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 0
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-07-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固