lexiandev / azuracast-php-api-client
AzuraCast is a standalone, turnkey web radio management tool. Radio stations hosted by AzuraCast expose a public API for viewing now playing data, making requests and more.
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2024-12-22 18:53:22 UTC
README
AzuraCast is a standalone, turnkey web radio management tool. Radio stations hosted by AzuraCast expose a public API for viewing now playing data, making requests and more.
Installation & Usage
Requirements
PHP 7.4 and later. Should also work with PHP 8.0.
Composer
To install the bindings via Composer, add the following to composer.json
:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" } ], "require": { "GIT_USER_ID/GIT_REPO_ID": "*@dev" } }
Then run composer install
Manual Installation
Download the files and include autoload.php
:
<?php require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: ApiKey $config = AzuraCast\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = AzuraCast\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer'); $apiInstance = new AzuraCast\Api\AdministrationCPUStatsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); try { $apiInstance->getServerStats(); } catch (Exception $e) { echo 'Exception when calling AdministrationCPUStatsApi->getServerStats: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://demo.azuracast.com/api
Models
- ApiAdminRelay
- ApiAdminStorageLocation
- ApiDetailedSongHistory
- ApiError
- ApiFileList
- ApiFileListAllOfDir
- ApiFileListAllOfMedia
- ApiFileListDir
- ApiHasSongFields
- ApiListener
- ApiListenerDevice
- ApiListenerLocation
- ApiNewRecord
- ApiNowPlaying
- ApiNowPlayingCurrentSong
- ApiNowPlayingListeners
- ApiNowPlayingLive
- ApiNowPlayingNowPlaying
- ApiNowPlayingPlayingNext
- ApiNowPlayingSongHistory
- ApiNowPlayingStation
- ApiNowPlayingStationMount
- ApiNowPlayingStationQueue
- ApiNowPlayingStationRemote
- ApiPodcast
- ApiPodcastCategory
- ApiPodcastEpisode
- ApiPodcastEpisodeAllOfMedia
- ApiPodcastEpisodeAllOfPlaylistMedia
- ApiPodcastMedia
- ApiSong
- ApiStationMedia
- ApiStationOnDemand
- ApiStationPlaylistQueue
- ApiStationQueueDetailed
- ApiStationRemote
- ApiStationRequest
- ApiStationSchedule
- ApiStationServiceStatus
- ApiStatus
- ApiSystemStatus
- ApiTime
- ApiUploadFile
- CustomField
- FileTypes
- GetStationNowPlayingStationIdParameter
- HasAutoIncrementId
- HasLinks
- HasSongFields
- HasUniqueId
- PostMediaArtMediaIdParameter
- Relay
- Role
- Settings
- SftpUser
- Station
- StationHlsStream
- StationMount
- StationPlaylist
- StationSchedule
- StationStreamer
- StationStreamerBroadcast
- StationWebhook
- User
Authorization
Authentication schemes defined for the API:
ApiKey
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
0.20.2
- Package version:
2.0.1
- Generator version:
7.8.0-SNAPSHOT
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen