Download the PHP package ampache/ampacheapi-php without Composer
On this page you can find all versions of the php package ampache/ampacheapi-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ampache/ampacheapi-php
More information about ampache/ampacheapi-php
Files in ampache/ampacheapi-php
Package ampacheapi-php
Short Description Ampache API PHP Library.
License AGPL-3.0
Homepage https://github.com/ampache/ampacheapi-php
Informations about the package ampacheapi-php
ampacheapi-php
Ampache API PHP Library.
NEWS
Version 2 of this library is underway.
There are major changes to help support multiple purporses as well as both XML and JSON responses.
The library will now return a SimpleXMLElement or json_encode string instead of the frankenstein.
This version of the library is supported from Ampache 6.2.0+
License
Ampache API PHP Library is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License v3 (AGPLv3) as published by the Free Software Foundation.
Get Started
Initialize
When creating an AmpacheApi object config is set using a config array.
- Required
- username: string - Your API username
- password: string - sha256 hashed API password
- server: string - Server address, without http/https prefix
- Optional
- debug: bool - Enable debug mode which will echo debug messages (default: false)
- debug_callback: string - server callback debugging function (default: null)
- api_secure: bool - Set to false to use http (default: true)
- api_format: string - Set API response version. 3, 4, 5, 6 (default: 6)
- server_version: int - Set API response format. xml, json (default: json)
So as an example; this is how the Ampache server would initialize the library.
Get server stats
Get all artists
Look in the /examples folder for more.