pub trait ExternalQuery: Debug + Send + Sync {
    fn search<'life0, 'life1, 'async_trait>(
        &'life0 self,
        title: &'life1 str,
        year: Option<i32>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ExternalMedia>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn search_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        external_id: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<ExternalMedia>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn cast<'life0, 'life1, 'async_trait>(
        &'life0 self,
        external_id: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ExternalActor>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; }
Expand description

Trait that must be implemented by external metadata agents which allows the scanners to query for data.

Required Methods§

Search by title and year. This must return a Vec of ExternalMedia sorted by the search score.

Search by external id. This must return a singular ExternalMedia which has the id passed in.

Get all actors for a media by external id. Actors must be ordered in order of importance.

Implementors§