using System.Collections.Generic;
using NzbDrone.Core.DiskSpace;

namespace NzbDrone.Api.DiskSpace
{
    public class DiskSpaceModule :NzbDroneRestModule<DiskSpaceResource>
    {
        private readonly IDiskSpaceService _diskSpaceService;

        public DiskSpaceModule(IDiskSpaceService diskSpaceService)
            :base("diskspace")
        {
            _diskSpaceService = diskSpaceService;
            GetResourceAll = GetFreeSpace;
        }

        public List<DiskSpaceResource> GetFreeSpace()
        {
            return ToListResource(_diskSpaceService.GetFreeSpace);
        }
    }
}
