pouler/deezer-api

PHP Package for the Deezer API

1.1.2 2022-12-08 13:31 UTC

This package is auto-updated.

Last update: 2024-11-08 17:48:32 UTC


README

Packagist

This is a PHP wrapper for the Deezer API.

Requirements

  • PHP >=8.1

Installation

Install it using Composer:

composer require pouler/deezer-api

Usage

Before using the Deezer API, you'll need to create an app at Deezer's developer site. After you've obtained an access token you can retrieve information from a user.

<?php

require 'vendor/autoload.php';

$curl = new \Symfony\Component\HttpClient\CurlHttpClient();
$client = new PouleR\DeezerAPI\DeezerAPIClient($curl);
$client->setAccessToken('');

$api = new PouleR\DeezerAPI\DeezerAPI($client);

print_r($api->getUserInformation());