承接 vinelab/itunes 相关项目开发

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

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

vinelab/itunes

Composer 安装命令:

composer require vinelab/itunes

包简介

iTunes Store Search API Library

README 文档

README

Build Status

Dependency Status

SensioLabsInsight

iTunes

A simple yet full-fledged iTunes API client with caching capabilities.

Installation

Composer

// change this to point correctly according
// to your folder structure.
require './vendor/autoload.php';

use Vinelab\ITunes\Agent as iTunes;

$iTunes = new iTunes();

$response = $iTunes->search('Porcupine Tree')); // The original iTunes response

$json = json_encode($response);

Laravel

  • Edit app.php and add 'Vinelab\ITunes\ITunesServiceProvider' to the 'providers' array. It will automatically alias itself as ITunes which can be used as a Facade class.
  • Run php artisan vendor:publish to publish the config file.

This library supports Laravel 4 and Laravel 5.x, for installation in L4 use version 1.1.x.

Usage

Search

<?php

    // Search the iTunes Store
    ITunes::search('Metallica');

    // Search the iTunes Store with custom parameters
    ITunes::search('Cannibal Corpse', array('limit'=>25, 'entity'=>'...'));

    /**
     * Search for media
     *
     * check (http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html#searching)
     * for all supported media types (the media parameter)
     */
    ITunes::music('Rolling Stones');

    ITunes::musicVideo('Immolation');

    ITunes::tvShow('Sex and The City');

In Region

You can search in a specific region by siply suffixing any media search method name with InRegion

    ITunes::musicInRegion('LB', 'Myriam Fares');

    ITunes::musicVideoInRegion('US', 'Immolation');

Lookup

<?php

    // Lookup defaults to id=...
    ITunes::lookup(490326927);

    // You can also specify the lookup request
    ITunes::lookup('amgVideoId', 17120);

    // Multiple items lookup
    ITunes::lookup('amgAlbumId', '15175,15176,15177,15178,15183,15184,15187,1519,15191,15195,15197,15198');

Caching

you can specify the duration (in minutes) of caching per request as follows

NOTE: The last cache duration value set will remain for the rest of the requests so make sure you reset afterwards.

<?php

    ITunes::cacheFor(10);
    ITunes::search('Gangnam Style'); // will be cached for 10 min.

    ITunes::cacheFor(1);
    ITunes::search('Yesterday'); // will be cached for 1 min.

    // To bypass caching pass 0
    ITunes::cacheFor(0);
    ITunes::search('Hallelujah'); // won't be cached

vinelab/itunes 适用场景与选型建议

vinelab/itunes 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.57k 次下载、GitHub Stars 达 13, 最近一次更新时间为 2013 年 09 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 vinelab/itunes 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 vinelab/itunes 我们能提供哪些服务?
定制开发 / 二次开发

基于 vinelab/itunes 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.57k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-09-19