iTunes Query System
- PHP >= 7.2
With Composer:
{
"require": {
"dariusiii/php-itunes-api": "dev-master"
}
}
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');
Method | Return |
---|---|
fetchById( int $id [, string $country [, bool $includeAlbums ] ] ) |
Artist |
fetchByName( string $name [, string $country ] ) |
SearchResults |
fetchOneByName( int $id [, string $country [, bool $includeAlbums ] ] ) |
Artist |
Method | Return |
---|---|
fetchById( int $id [, string $country [, bool $includeTracks ] ] ) |
Album |
fetchByName( string $name [, string $country ] ) |
SearchResults |
fetchOneByName( int $id [, string $country [, bool $includeTracks ] ] ) |
Album |
Method | Return |
---|---|
fetchById( int $id [, string $country ] ) |
Track |
fetchByName( string $name [, string $country ] ) |
SearchResults |
fetchOneByName( int $id [, string $country ] ) |
Track |
Method | Return |
---|---|
fetchById( int $id [, string $country ] ) |
Movie |
fetchByName( string $name [, string $country ] ) |
SearchResults |
fetchOneByName( int $id [, string $country ] ) |
Movie |
Method | Return |
---|---|
fetchById( int $id [, string $country ] ) |
Ebook |
fetchByName( string $name [, string $country ] ) |
SearchResults |
fetchOneByName( int $id [, string $country ] ) |
Ebook |
Attribute | Type | Description |
---|---|---|
itunesId | integer | - |
name | string | - |
albums | Collection | - |
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 | - |
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 |
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 |
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 |
A Collection
is an ArrayObject
A SearchResults
is an ArrayObject