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.

2.0.1 2024-08-22 18:09 UTC

This package is auto-updated.

Last update: 2025-03-22 19:21:04 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

Class Method HTTP request Description
AdministrationCPUStatsApi getServerStats GET /admin/server/stats
AdministrationCustomFieldsApi addCustomField POST /admin/custom_fields
AdministrationCustomFieldsApi deleteCustomField DELETE /admin/custom_field/{id}
AdministrationCustomFieldsApi editCustomField PUT /admin/custom_field/{id}
AdministrationCustomFieldsApi getCustomField GET /admin/custom_field/{id}
AdministrationCustomFieldsApi getCustomFields GET /admin/custom_fields
AdministrationRelaysApi internalGetRelayDetails GET /internal/relays
AdministrationRolesApi addRole POST /admin/roles
AdministrationRolesApi deleteRole DELETE /admin/role/{id}
AdministrationRolesApi editRole PUT /admin/role/{id}
AdministrationRolesApi getPermissions GET /admin/permissions
AdministrationRolesApi getRole GET /admin/role/{id}
AdministrationRolesApi getRoles GET /admin/roles
AdministrationSettingsApi editSettings PUT /admin/settings
AdministrationSettingsApi getSettings GET /admin/settings
AdministrationStationsApi adminAddStation POST /admin/stations
AdministrationStationsApi adminDeleteStation DELETE /admin/station/{id}
AdministrationStationsApi adminEditStation PUT /admin/station/{id}
AdministrationStationsApi adminGetStation GET /admin/station/{id}
AdministrationStationsApi adminGetStations GET /admin/stations
AdministrationStorageLocationsApi addStorageLocation POST /admin/storage_locations
AdministrationStorageLocationsApi deleteStorageLocation DELETE /admin/storage_location/{id}
AdministrationStorageLocationsApi editStorageLocation PUT /admin/storage_location/{id}
AdministrationStorageLocationsApi getStorageLocation GET /admin/storage_location/{id}
AdministrationStorageLocationsApi getStorageLocations GET /admin/storage_locations
AdministrationUsersApi addUser POST /admin/users
AdministrationUsersApi deleteUser DELETE /admin/user/{id}
AdministrationUsersApi editUser PUT /admin/user/{id}
AdministrationUsersApi getUser GET /admin/user/{id}
AdministrationUsersApi getUsers GET /admin/users
MiscellaneousApi getStatus GET /status
MiscellaneousApi getTime GET /time
NowPlayingApi getAllNowPlaying GET /nowplaying
NowPlayingApi getStationNowPlaying GET /nowplaying/{station_id}
StationsBroadcastingApi deleteStereoToolConfiguration DELETE /station/{station_id}/stereo-tool-configuration
StationsBroadcastingApi getStereoToolConfiguration GET /station/{station_id}/stereo-tool-configuration
StationsBroadcastingApi postStereoToolConfiguration POST /station/{station_id}/stereo-tool-configuration
StationsGeneralApi deleteStationFallback DELETE /station/{station_id}/fallback
StationsGeneralApi getStation GET /station/{station_id}
StationsGeneralApi getStationFallback GET /station/{station_id}/fallback
StationsGeneralApi getStations GET /stations
StationsGeneralApi postStationFallback POST /station/{station_id}/fallback
StationsHLSStreamsApi addHlsStream POST /station/{station_id}/hls_streams
StationsHLSStreamsApi deleteHlsStream DELETE /station/{station_id}/hls_stream/{id}
StationsHLSStreamsApi editHlsStream PUT /station/{station_id}/hls_stream/{id}
StationsHLSStreamsApi getHlsStream GET /station/{station_id}/hls_stream/{id}
StationsHLSStreamsApi getHlsStreams GET /station/{station_id}/hls_streams
StationsHistoryApi getStationHistory GET /station/{station_id}/history
StationsListenersApi getStationListeners GET /station/{station_id}/listeners
StationsMediaApi addFile POST /station/{station_id}/files
StationsMediaApi deleteFile DELETE /station/{station_id}/file/{id}
StationsMediaApi deleteMediaArt DELETE /station/{station_id}/art/{media_id}
StationsMediaApi editFile PUT /station/{station_id}/file/{id}
StationsMediaApi getFile GET /station/{station_id}/file/{id}
StationsMediaApi getFiles GET /station/{station_id}/files
StationsMediaApi getMediaArt GET /station/{station_id}/art/{media_id}
StationsMediaApi postMediaArt POST /station/{station_id}/art/{media_id}
StationsMountPointsApi addMount POST /station/{station_id}/mounts
StationsMountPointsApi deleteMount DELETE /station/{station_id}/mount/{id}
StationsMountPointsApi deleteMountIntro DELETE /station/{station_id}/mount/{id}/intro
StationsMountPointsApi editMount PUT /station/{station_id}/mount/{id}
StationsMountPointsApi getMount GET /station/{station_id}/mount/{id}
StationsMountPointsApi getMountIntro GET /station/{station_id}/mount/{id}/intro
StationsMountPointsApi getStationMounts GET /station/{station_id}/mounts
StationsMountPointsApi postMountIntro POST /station/{station_id}/mount/{id}/intro
StationsPlaylistsApi addPlaylist POST /station/{station_id}/playlists
StationsPlaylistsApi deletePlaylist DELETE /station/{station_id}/playlist/{id}
StationsPlaylistsApi editPlaylist PUT /station/{station_id}/playlist/{id}
StationsPlaylistsApi getPlaylist GET /station/{station_id}/playlist/{id}
StationsPlaylistsApi getPlaylists GET /station/{station_id}/playlists
StationsPodcastsApi addEpisode POST /station/{station_id}/podcast/{podcast_id}/episodes
StationsPodcastsApi addPodcast POST /station/{station_id}/podcasts
StationsPodcastsApi deleteEpisode DELETE /station/{station_id}/podcast/{podcast_id}/episode/{id}
StationsPodcastsApi deletePodcast DELETE /station/{station_id}/podcast/{id}
StationsPodcastsApi deletePodcastArt DELETE /station/{station_id}/podcast/{podcast_id}/art
StationsPodcastsApi deletePodcastEpisodeArt DELETE /station/{station_id}/podcast/{podcast_id}/episode/{episode_id}/art
StationsPodcastsApi deletePodcastEpisodeMedia DELETE /station/{station_id}/podcast/{podcast_id}/episode/{episode_id}/media
StationsPodcastsApi editEpisode PUT /station/{station_id}/podcast/{podcast_id}/episode/{id}
StationsPodcastsApi editPodcast PUT /station/{station_id}/podcast/{id}
StationsPodcastsApi getEpisode GET /station/{station_id}/podcast/{podcast_id}/episode/{id}
StationsPodcastsApi getEpisodes GET /station/{station_id}/podcast/{podcast_id}/episodes
StationsPodcastsApi getPodcast GET /station/{station_id}/podcast/{id}
StationsPodcastsApi getPodcastArt GET /station/{station_id}/podcast/{podcast_id}/art
StationsPodcastsApi getPodcastEpisodeArt GET /station/{station_id}/podcast/{podcast_id}/episode/{episode_id}/art
StationsPodcastsApi getPodcastEpisodeMedia GET /station/{station_id}/podcast/{podcast_id}/episode/{episode_id}/media
StationsPodcastsApi getPodcasts GET /station/{station_id}/podcasts
StationsPodcastsApi postPodcastArt POST /station/{station_id}/podcast/{podcast_id}/art
StationsPodcastsApi postPodcastEpisodeArt POST /station/{station_id}/podcast/{podcast_id}/episode/{episode_id}/art
StationsPodcastsApi postPodcastEpisodeMedia POST /station/{station_id}/podcast/{podcast_id}/episode/{episode_id}/media
StationsQueueApi deleteQueueItem DELETE /station/{station_id}/queue/{id}
StationsQueueApi getQueue GET /station/{station_id}/queue
StationsQueueApi getQueueItem GET /station/{station_id}/queue/{id}
StationsRemoteRelaysApi addRelay POST /station/{station_id}/remotes
StationsRemoteRelaysApi deleteRelay DELETE /station/{station_id}/remote/{id}
StationsRemoteRelaysApi editRelay PUT /station/{station_id}/remote/{id}
StationsRemoteRelaysApi getRelay GET /station/{station_id}/remote/{id}
StationsRemoteRelaysApi getRelays GET /station/{station_id}/remotes
StationsSFTPUsersApi addSftpUser POST /station/{station_id}/sftp-users
StationsSFTPUsersApi deleteSftpUser DELETE /station/{station_id}/sftp-user/{id}
StationsSFTPUsersApi editSftpUser PUT /station/{station_id}/sftp-user/{id}
StationsSFTPUsersApi getSftpUser GET /station/{station_id}/sftp-user/{id}
StationsSFTPUsersApi getSftpUsers GET /station/{station_id}/sftp-users
StationsSchedulesApi getSchedule GET /station/{station_id}/schedule
StationsServiceControlApi doBackendServiceAction POST /station/{station_id}/backend/{action}
StationsServiceControlApi doFrontendServiceAction POST /station/{station_id}/frontend/{action}
StationsServiceControlApi getServiceStatus GET /station/{station_id}/status
StationsServiceControlApi restartServices POST /station/{station_id}/restart
StationsSongRequestsApi getRequestableSongs GET /station/{station_id}/requests
StationsSongRequestsApi submitSongRequest POST /station/{station_id}/request/{request_id}
StationsStreamersDJsApi addStreamer POST /station/{station_id}/streamers
StationsStreamersDJsApi deleteStreamer DELETE /station/{station_id}/streamer/{id}
StationsStreamersDJsApi editStreamer PUT /station/{station_id}/streamer/{id}
StationsStreamersDJsApi getStreamer GET /station/{station_id}/streamer/{id}
StationsStreamersDJsApi getStreamers GET /station/{station_id}/streamers
StationsWebHooksApi addWebhook POST /station/{station_id}/webhooks
StationsWebHooksApi deleteWebhook DELETE /station/{station_id}/webhook/{id}
StationsWebHooksApi editWebhook PUT /station/{station_id}/webhook/{id}
StationsWebHooksApi getWebhook GET /station/{station_id}/webhook/{id}
StationsWebHooksApi getWebhooks GET /station/{station_id}/webhooks

Models

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
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen