dariusiii/php-itunes-api
Composer 安装命令:
composer require dariusiii/php-itunes-api
包简介
Query iTunes API System
README 文档
README
iTunes Query System
Requirements:
- PHP >= 7.2
Installation:
With Composer:
{
"require": {
"dariusiii/php-itunes-api": "dev-master"
}
}
Usage:
You can search artists, albums and tracks (by now)
<?php use DariusIII\ItunesApi\iTunes; $artistsFinder = iTunes::load('artist'); $albumsFinder = iTunes::load('album'); $tracksFinder = iTunes::load('track'); $moviesFinder = iTunes::load('movie'); $ebooksFinder = iTunes::load('ebook');
Finders' methods
Artists Finder
| Method | Return |
|---|---|
fetchById( int $id [, string $country [, bool $includeAlbums ] ] ) |
Artist |
fetchByName( string $name [, string $country ] ) |
SearchResults |
fetchOneByName( int $id [, string $country [, bool $includeAlbums ] ] ) |
Artist |
Albums Finder
| Method | Return |
|---|---|
fetchById( int $id [, string $country [, bool $includeTracks ] ] ) |
Album |
fetchByName( string $name [, string $country ] ) |
SearchResults |
fetchOneByName( int $id [, string $country [, bool $includeTracks ] ] ) |
Album |
Tracks Finder
| Method | Return |
|---|---|
fetchById( int $id [, string $country ] ) |
Track |
fetchByName( string $name [, string $country ] ) |
SearchResults |
fetchOneByName( int $id [, string $country ] ) |
Track |
Movies Finder
| Method | Return |
|---|---|
fetchById( int $id [, string $country ] ) |
Movie |
fetchByName( string $name [, string $country ] ) |
SearchResults |
fetchOneByName( int $id [, string $country ] ) |
Movie |
Ebooks Finder
| Method | Return |
|---|---|
fetchById( int $id [, string $country ] ) |
Ebook |
fetchByName( string $name [, string $country ] ) |
SearchResults |
fetchOneByName( int $id [, string $country ] ) |
Ebook |
Entities
Artist Entity
| Attribute | Type | Description |
|---|---|---|
| itunesId | integer | - |
| name | string | - |
| albums | Collection | - |
Album Entity
| Attribute | Type | Description |
|---|---|---|
| itunesId | integer | - |
| artistId | integer | iTunes artist's ID |
| artistName | string | iTunes artist's Name |
| name | string | - |
| cover | string | URL to image |
| explicit | bool | - |
| tracksCount | integer | - |
| releaseDate | DateTime | - |
| tracks | Collection | - |
Track Entity
| Attribute | Type | Description |
|---|---|---|
| itunesId | integer | - |
| artistId | integer | iTunes artist's ID |
| albumId | integer | iTunes album's ID |
| name | string | - |
| artistName | string | iTunes artist's name |
| preview | string | URL to track's audio preview |
| explicit | bool | - |
| trackNumber | integer | - |
| length | integer | Track's lenght in milliseconds |
| cover | string | URL to track cover |
Movie Entity
| Attribute | Type | Description |
|---|---|---|
| itunesId | integer | - |
| artistId | integer | iTunes artist's ID |
| name | string | - |
| director | string | Movie director(s) |
| cover | string | URL to movie's cover |
| storeUrl | string | URL to movie's page |
| trailer | string | URL to movie's trailer |
| explicit | bool | - |
| description | string | Movie description |
| tagline | string | Movie tagline |
| releaseDate | DateTime | Movie release date |
| genre | string | Movie genre |
Ebook Entity
| Attribute | Type | Description |
|---|---|---|
| itunesId | integer | - |
| artistId | integer | iTunes artist's ID |
| name | string | - |
| author | string | Book author |
| cover | string | URL to ebook cover |
| storeUrl | string | URL to book's page |
| description | string | Book description |
| releaseDate | DateTime | Book release date |
| genre | array | Boook genre |
Collections
Collection
A Collection is an ArrayObject
SearchResults
A SearchResults is an ArrayObject
dariusiii/php-itunes-api 适用场景与选型建议
dariusiii/php-itunes-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.97k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2018 年 11 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「query」 「apple」 「itunes」 「music」 「movies」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dariusiii/php-itunes-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dariusiii/php-itunes-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dariusiii/php-itunes-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple library to decode and parse Apple Sign In client tokens.
Query filtering in your frontend
Anax Database Active Record module for model classes.
Apple Push Notification & Feedback Provider
A PSR-7 compatible library for making CRUD API endpoints
Database/ORM-agnostic query construction helper
统计信息
- 总下载量: 16.97k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2018-11-26