public CardsAddBytesAttachmentRequest(ICardId card, BytesAttachment attachment)
			: base(card, "attachments", Method.POST)
		{
			Guard.NotNull(attachment, "attachment");
			Guard.NotNull(attachment.Contents, "attachment.Contents");
			Guard.LengthBetween(attachment.Name, 0, 256, "attachment.Name");

			AddParameter("name", attachment.Name);			
			AddFile("file", attachment.Contents, attachment.FileName ?? attachment.Name);
		}
        public CardsAddBytesAttachmentRequest(ICardId card, BytesAttachment attachment)
            : base(card, "attachments", Method.POST)
        {
            Guard.NotNull(attachment, "attachment");
            Guard.NotNull(attachment.Contents, "attachment.Contents");
            Guard.LengthBetween(attachment.Name, 0, 256, "attachment.Name");

            AddParameter("name", attachment.Name);
            AddFile("file", attachment.Contents, attachment.FileName ?? attachment.Name);
        }
Beispiel #3
0
 public void AddAttachment(ICardId card, BytesAttachment attachment)
 {
     _restClient.Request(new CardsAddBytesAttachmentRequest(card, attachment));
 }
Beispiel #4
0
		public void AddAttachment(ICardId card, BytesAttachment attachment)
		{
			_restClient.Request(new CardsAddBytesAttachmentRequest(card, attachment));
		}
Beispiel #5
0
 public Task AddAttachment(ICardId card, BytesAttachment attachment)
 {
     return _restClient.RequestAsync(new CardsAddBytesAttachmentRequest(card, attachment));
 }
Beispiel #6
0
 public Task AddAttachment(ICardId card, BytesAttachment attachment)
 {
     return(_restClient.RequestAsync(new CardsAddBytesAttachmentRequest(card, attachment)));
 }