timlebrun/itunes-search

A small package to interact with Itunes Search API

v1.0.3 2018-11-19 16:33 UTC

This package is auto-updated.

Last update: 2024-09-21 20:41:12 UTC


README

This package aims to help interacting with Apple's iTunes Search API, to find stuff and things on the Store.

The API is kinda limited to about 20 requests a minute, so this package contains a small cache class and I strongly recommend using it.

Usage

Initializing

$options = [
	'cache' => './itunes.json',
	// todo add 'ttl' => 3600,
];
$itunes = Itunes::connect($options);
$itunes->bundle('com.airweb.tixipass');

// Returns an ItunesEntity Object

Lookup

Performs a Lookup request to the API

$itunes->lookup([
	'key' => 'value'
]);

// Returns an ItunesCollection object containing a list of ItunesEntity objects

To learn what keys and value you can set here, please refer to the Apple Documentation.

ItunesCollection object extends from Laravel's Collections.

Bundle ID

Its is possible to get an App by its bundle ID. It returns only a single entity, because Bundle IDs are unique. (maybe I should do the same for IDs ?).

$itunes->bundle('com.airweb.tixipass');

// Returns an ItunesEntity Object

This package comes with a WTFPL licence, so don't expect support or anything from me (please, thanks).

Love, bye ♥