using System;
using Kyoo.Models;
using System.Collections.Generic;
using System.Threading.Tasks;
using JetBrains.Annotations;
namespace Kyoo.Controllers
{
///
/// An interface to automatically retrieve metadata from external providers.
///
public interface IMetadataProvider
{
///
/// The corresponding to this provider.
/// This allow to map metadata to a provider, keep metadata links and
/// know witch is used for a specific .
///
Provider Provider { get; }
///
/// Return a new item with metadata from your provider.
///
///
/// The item to retrieve metadata from. Most of the time, only the name will be available but other
/// properties may be filed by other providers before a call to this method. This can allow you to identify
/// the collection on your provider.
///
///
/// You must not use metadata from the given .
/// Merging metadata is the job of Kyoo, a complex is given
/// to make a precise search and give you every available properties, not to discard properties.
///
///
/// If this metadata provider does not support .
///
/// A new containing metadata from your provider
[ItemCanBeNull]
Task Get([NotNull] T item)
where T : class, IResource;
///
/// Search for a specific type of items with a given query.
///
/// The search query to use.
///
/// If this metadata provider does not support .
///
/// The list of items that could be found on this specific provider.
[ItemNotNull]
Task> Search(string query)
where T : class, IResource;
Task> GetPeople(Show show);
}
}