Skip to content

Commit ca6805b

Browse files
committed
Updating Readme and LK integration attachments
1 parent c66043f commit ca6805b

3 files changed

Lines changed: 36 additions & 1 deletion

File tree

LeanKit.API.Client.Library/ILeanKitIntegration.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ public interface ILeanKitIntegration
4848
void MoveTask(long taskId, long cardId, long toLaneId, int position);
4949
void MoveTask(long taskId, long cardId, long toLaneId, int position, string wipOverrideReason);
5050

51+
IEnumerable<Asset> GetAttachments(long cardId);
52+
Asset GetAttachment(long cardId, long attachmentId);
53+
void SaveAttachment(long cardId, string fileName, string description, string mimeType, byte[] fileBytes);
54+
void DeleteAttachment(long cardId, long attachmentId);
55+
5156
#region obsolete
5257

5358
[Obsolete("Creating taskboards is no longer supported", true)]

LeanKit.API.Client.Library/LeanKitIntegration.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System;
88
using System.Collections.Generic;
99
using System.Linq;
10+
using System.Security.Cryptography;
1011
using System.Threading;
1112
using LeanKit.API.Client.Library.Enumerations;
1213
using LeanKit.API.Client.Library.EventArguments;
@@ -872,6 +873,26 @@ public void MoveTask(long taskId, long cardId, long toLaneId, int position, stri
872873
//TODO: Figure out how to handle taskboards
873874
}
874875

876+
public IEnumerable<Asset> GetAttachments(long cardId)
877+
{
878+
return _api.GetAttachments(_boardId, cardId);
879+
}
880+
881+
public Asset GetAttachment(long cardId, long attachmentId)
882+
{
883+
return _api.GetAttachment(_boardId, cardId, attachmentId);
884+
}
885+
886+
public void SaveAttachment(long cardId, string fileName, string description, string mimeType, byte[] fileBytes)
887+
{
888+
_api.SaveAttachment(_boardId, cardId, fileName, description, mimeType, fileBytes);
889+
}
890+
891+
public void DeleteAttachment(long cardId, long attachmentId)
892+
{
893+
_api.DeleteAttachment(_boardId, cardId, attachmentId);
894+
}
895+
875896
#region obsolete
876897

877898
[Obsolete("Creating taskboards is no longer supported", true)]

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ IEnumerable<Comment> GetComments(long boardId, long cardId);
7676
int PostComment(long boardId, long cardId, Comment comment);
7777
IEnumerable<CardEvent> GetCardHistory(long boardId, long cardId);
7878
IEnumerable<CardView> SearchCards(long boardId, SearchOptions options);
79+
IEnumerable<Asset> GetAttachments(long boardId, long cardId);
80+
long SaveAttachment(long boardId, long cardId, string fileName, string description, string mimeType, byte[] fileBytes);
81+
long DeleteAttachment(long boardId, long cardId, long attachmentId);
82+
Asset GetAttachment(long boardId, long cardId, long attachmentId);
7983
```
8084

8185
### LeanKitIntegration Interface
@@ -104,6 +108,11 @@ Board GetBoard();
104108
void MoveCard(long cardId, long toLaneId, int position, string wipOverrideReason);
105109
void MoveCard(long cardId, long toLaneId, int position);
106110
IEnumerable<CardView> SearchCards(SearchOptions options);
111+
IEnumerable<Asset> GetAttachments(long cardId);
112+
Asset GetAttachment(long cardId, long attachmentId);
113+
void SaveAttachment(long cardId, string fileName, string description, string mimeType, byte[] fileBytes);
114+
void DeleteAttachment(long cardId, long attachmentId);
115+
107116
```
108117

109118
### BoardChangedEventArgs Properties
@@ -135,7 +144,7 @@ Visit [support.leankit.com](http://support.leankit.com).
135144

136145
## Copyright
137146

138-
Copyright &copy; 2013 LeanKit Inc.
147+
Copyright &copy; 2013-2014 LeanKit Inc.
139148

140149
## License
141150

0 commit comments

Comments
 (0)