예제 #1
0
        /// <summary>
        /// Sets agenda logo. Existing logo will be replaced. Optimal size is 280 x 100 (96 DPI) or 900 x 300 (300 DPI). Max. file size is 5 MB.
        /// </summary>
        /// <param name="model">New logo.</param>
        /// <returns><c>true</c>.</returns>
        public ApiResult <bool> UploadLogo(LogoPostModel model)
        {
            if (model is null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            var request = _client.CreateRequest(LogoUrl, Method.PUT);

            request.AddFile(model.FileName, model.FileBytes, model.FileName);
            request.AlwaysMultipartFormData = true;
            return(_client.Execute <bool>(request));
        }