refactor: Complete REST API simplification with channels module
Changes: 1. Updated pmoserver_ext.rs to use channels module: - Changed imports from paradise:: to channels:: - Now uses ChannelDescriptor from channels module - No longer depends on paradise orchestration code 2. Updated lib.rs: - Added pub mod channels - Maintains existing modules for now (will evaluate removal later) 3. Verification: - All tests pass (25/25) - No dead code warnings - Compilation successful with all features The REST API is now simplified to provide only direct Radio Paradise API access without the heavy orchestration layer.
This commit is contained in:
@@ -218,6 +218,7 @@
|
|||||||
//! - [Radio Paradise](https://radioparadise.com) - Official website
|
//! - [Radio Paradise](https://radioparadise.com) - Official website
|
||||||
//! - [Radio Paradise API](https://api.radioparadise.com) - API documentation
|
//! - [Radio Paradise API](https://api.radioparadise.com) - API documentation
|
||||||
|
|
||||||
|
pub mod channels;
|
||||||
pub mod client;
|
pub mod client;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
pub mod models;
|
pub mod models;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//! Ce module fournit un trait d'extension pour ajouter facilement l'API Radio Paradise
|
//! Ce module fournit un trait d'extension pour ajouter facilement l'API Radio Paradise
|
||||||
//! à un serveur pmoserver.
|
//! à un serveur pmoserver.
|
||||||
|
|
||||||
use crate::paradise::{max_channel_id, ALL_CHANNELS};
|
use crate::channels::{max_channel_id, ChannelDescriptor, ALL_CHANNELS};
|
||||||
use crate::{Block, NowPlaying, RadioParadiseClient};
|
use crate::{Block, NowPlaying, RadioParadiseClient};
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::{Path, Query, State},
|
extract::{Path, Query, State},
|
||||||
@@ -73,8 +73,8 @@ pub struct ChannelInfo {
|
|||||||
pub description: String,
|
pub description: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<&crate::paradise::ChannelDescriptor> for ChannelInfo {
|
impl From<&ChannelDescriptor> for ChannelInfo {
|
||||||
fn from(descriptor: &crate::paradise::ChannelDescriptor) -> Self {
|
fn from(descriptor: &ChannelDescriptor) -> Self {
|
||||||
Self {
|
Self {
|
||||||
id: descriptor.id,
|
id: descriptor.id,
|
||||||
name: descriptor.display_name.to_string(),
|
name: descriptor.display_name.to_string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user