using IWS5.Autotest.IWS5.Api.ApiEndpointFormats;
using IWS5.Autotest.IWS5.Api.Common.Pashn.Autotests.Pashn.Api.Common;
using IWS5.Autotest.IWS5.Api.Common;
using IWS5.Core.DTO;
using RestSharp;

namespace IWS5.Autotest.IWS5.Api.Api
{
    public class ButtonsControllerApi : BaseAppApi
    {
        private readonly SessionStorage _sessionStorage;

        public ButtonsControllerApi(SessionStorage sessionStorage) : base(ApiEndpointFormat.Buttons.Base, sessionStorage)
        {
            _sessionStorage = sessionStorage;
        }

        public async Task<RestResponse<List<ButtonListItemDTO>>> GetWorkItemsInboxForUser(string queueName)
        {
            var request = CreateGetRequest();

            request.AddQueryParameter("queueName", queueName);

            return await ExecuteRequest<List<ButtonListItemDTO>>(request);
        }        
    }
}
