using System.Threading.Tasks;
using MediaBrowser.Controller.Net;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.Services;
namespace MediaBrowser.Api
{
///
/// Class GetCultures
///
[Route("/Localization/Cultures", "GET", Summary = "Gets known cultures")]
public class GetCultures : IReturn
{
}
///
/// Class GetCountries
///
[Route("/Localization/Countries", "GET", Summary = "Gets known countries")]
public class GetCountries : IReturn
{
}
///
/// Class ParentalRatings
///
[Route("/Localization/ParentalRatings", "GET", Summary = "Gets known parental ratings")]
public class GetParentalRatings : IReturn
{
}
///
/// Class ParentalRatings
///
[Route("/Localization/Options", "GET", Summary = "Gets localization options")]
public class GetLocalizationOptions : IReturn
{
}
///
/// Class CulturesService
///
[Authenticated(AllowBeforeStartupWizard = true)]
public class LocalizationService : BaseApiService
{
///
/// The _localization
///
private readonly ILocalizationManager _localization;
///
/// Initializes a new instance of the class.
///
/// The localization.
public LocalizationService(ILocalizationManager localization)
{
_localization = localization;
}
///
/// Gets the specified request.
///
/// The request.
/// System.Object.
public object Get(GetParentalRatings request)
{
var result = _localization.GetParentalRatings();
return ToOptimizedResult(result);
}
public object Get(GetLocalizationOptions request)
{
var result = _localization.GetLocalizationOptions();
return ToOptimizedResult(result);
}
///
/// Gets the specified request.
///
/// The request.
/// System.Object.
public async Task