diff --git a/Source/Podio .NET/Models/ByLine.cs b/Source/Podio .NET/Models/ByLine.cs index ba1d45a7..3cab6344 100644 --- a/Source/Podio .NET/Models/ByLine.cs +++ b/Source/Podio .NET/Models/ByLine.cs @@ -14,7 +14,7 @@ public class ByLine public string AvatarType { get; set; } [JsonProperty(PropertyName = "avatar_id")] - public int? AvatarId { get; set; } + public long? AvatarId { get; set; } [JsonProperty(PropertyName = "image")] public Image Image { get; set; } @@ -26,6 +26,6 @@ public class ByLine public string Url { get; set; } [JsonProperty(PropertyName = "avatar")] - public int? Avatar { get; set; } + public long? Avatar { get; set; } } } \ No newline at end of file diff --git a/Source/Podio .NET/Models/Contact.cs b/Source/Podio .NET/Models/Contact.cs index 8ba713d1..e86b8a12 100644 --- a/Source/Podio .NET/Models/Contact.cs +++ b/Source/Podio .NET/Models/Contact.cs @@ -25,7 +25,7 @@ public class Contact /// The file id of the avatar /// [JsonProperty("avatar", NullValueHandling = NullValueHandling.Ignore)] - public int Avatar { get; set; } + public long Avatar { get; set; } public DateTime? BirthDate { diff --git a/Source/Podio .NET/Models/ConversationMessage.cs b/Source/Podio .NET/Models/ConversationMessage.cs index 6f2acd05..402888c4 100644 --- a/Source/Podio .NET/Models/ConversationMessage.cs +++ b/Source/Podio .NET/Models/ConversationMessage.cs @@ -13,7 +13,7 @@ public class ConversationMessage public int? EmbedId { get; set; } [JsonProperty(PropertyName = "embed_file_id")] - public int? EmbedFileId { get; set; } + public long? EmbedFileId { get; set; } [JsonProperty(PropertyName = "text")] public string Text { get; set; } diff --git a/Source/Podio .NET/Models/FileAttachment.cs b/Source/Podio .NET/Models/FileAttachment.cs index f421c939..25c018e4 100644 --- a/Source/Podio .NET/Models/FileAttachment.cs +++ b/Source/Podio .NET/Models/FileAttachment.cs @@ -7,7 +7,7 @@ namespace PodioAPI.Models public class FileAttachment { [JsonProperty("file_id")] - public int FileId { get; set; } + public long FileId { get; set; } [JsonProperty("link")] public string Link { get; set; } diff --git a/Source/Podio .NET/Models/Grant.cs b/Source/Podio .NET/Models/Grant.cs index e7335fd1..d31907b7 100644 --- a/Source/Podio .NET/Models/Grant.cs +++ b/Source/Podio .NET/Models/Grant.cs @@ -12,7 +12,7 @@ public class Grant public string refType { get; set; } [JsonProperty("ref_id")] - public int refId { get; set; } + public long refId { get; set; } [JsonProperty("action")] public string Action { get; set; } diff --git a/Source/Podio .NET/Models/Image.cs b/Source/Podio .NET/Models/Image.cs index 7f40a3b6..59b6e506 100644 --- a/Source/Podio .NET/Models/Image.cs +++ b/Source/Podio .NET/Models/Image.cs @@ -17,7 +17,7 @@ public class Image public string Link { get; set; } [JsonProperty("file_id")] - public int FileId { get; set; } + public long FileId { get; set; } [JsonProperty("link_target")] public string LinkTarget { get; set; } diff --git a/Source/Podio .NET/Models/Item.cs b/Source/Podio .NET/Models/Item.cs index 2c38f6c7..cd6a9e83 100644 --- a/Source/Podio .NET/Models/Item.cs +++ b/Source/Podio .NET/Models/Item.cs @@ -9,7 +9,7 @@ namespace PodioAPI.Models public class Item { [JsonProperty("item_id")] - public int ItemId { get; set; } + public long ItemId { get; set; } [JsonProperty("external_id")] public string ExternalId { get; set; } @@ -114,7 +114,7 @@ public class Item public Grant Grant { get; set; } [JsonProperty("file_ids")] - public List FileIds { get; set; } + public List FileIds { get; set; } [JsonProperty("tasks")] public List Tasks { get; set; } diff --git a/Source/Podio .NET/Models/ItemMicro.cs b/Source/Podio .NET/Models/ItemMicro.cs index 1b5d1c92..cbcf3008 100644 --- a/Source/Podio .NET/Models/ItemMicro.cs +++ b/Source/Podio .NET/Models/ItemMicro.cs @@ -8,7 +8,7 @@ public class ItemMicro public int AppItemId { get; set; } [JsonProperty("item_id")] - public int ItemId { get; set; } + public long ItemId { get; set; } [JsonProperty("title")] public string Title { get; set; } diff --git a/Source/Podio .NET/Models/Organization.cs b/Source/Podio .NET/Models/Organization.cs index 43eb1f75..39a9a53e 100644 --- a/Source/Podio .NET/Models/Organization.cs +++ b/Source/Podio .NET/Models/Organization.cs @@ -15,7 +15,7 @@ public class Organization public string Type { get; set; } [JsonProperty("logo")] - public int? Logo { get; set; } + public long? Logo { get; set; } [JsonProperty("url")] public string Url { get; set; } diff --git a/Source/Podio .NET/Models/Presence.cs b/Source/Podio .NET/Models/Presence.cs index fb63b76d..10a05631 100644 --- a/Source/Podio .NET/Models/Presence.cs +++ b/Source/Podio .NET/Models/Presence.cs @@ -5,7 +5,7 @@ namespace PodioAPI.Models public class Presence { [JsonProperty("ref_id")] - public int? RefId { get; set; } + public long? RefId { get; set; } [JsonProperty("ref_type")] public string RefType { get; set; } diff --git a/Source/Podio .NET/Models/Profile.cs b/Source/Podio .NET/Models/Profile.cs index c762c197..2d97828e 100644 --- a/Source/Podio .NET/Models/Profile.cs +++ b/Source/Podio .NET/Models/Profile.cs @@ -9,7 +9,7 @@ public class Profile public int ProfileId { get; set; } [JsonProperty("avatar")] - public int? Avatar { get; set; } + public long? Avatar { get; set; } [JsonProperty("image")] public Image Image { get; set; } diff --git a/Source/Podio .NET/Models/Reference.cs b/Source/Podio .NET/Models/Reference.cs index a0a61a46..2d076ec9 100644 --- a/Source/Podio .NET/Models/Reference.cs +++ b/Source/Podio .NET/Models/Reference.cs @@ -10,7 +10,7 @@ public class Reference public string Type { get; set; } [JsonProperty(PropertyName = "id")] - public int? Id { get; set; } + public long? Id { get; set; } [JsonProperty(PropertyName = "title")] public string Title { get; private set; } diff --git a/Source/Podio .NET/Models/Request/BulkDeleteRequest.cs b/Source/Podio .NET/Models/Request/BulkDeleteRequest.cs index f006581e..49623411 100644 --- a/Source/Podio .NET/Models/Request/BulkDeleteRequest.cs +++ b/Source/Podio .NET/Models/Request/BulkDeleteRequest.cs @@ -10,7 +10,7 @@ public class BulkDeleteRequest /// An explicit list of item ids to be deleted /// [JsonProperty(PropertyName = "item_ids", NullValueHandling = NullValueHandling.Ignore)] - public List ItemIds { get; set; } + public List ItemIds { get; set; } /// /// The id of the saved view whose items are to be deleted. Ignored if "item_ids" is given. diff --git a/Source/Podio .NET/Models/Request/CommentCreateUpdateRequest.cs b/Source/Podio .NET/Models/Request/CommentCreateUpdateRequest.cs index fc132299..5eeb6747 100644 --- a/Source/Podio .NET/Models/Request/CommentCreateUpdateRequest.cs +++ b/Source/Podio .NET/Models/Request/CommentCreateUpdateRequest.cs @@ -21,7 +21,7 @@ public class CommentCreateUpdateRequest /// Temporary files that have been uploaded and should be attached to this comment. /// [JsonProperty(PropertyName = "file_ids", NullValueHandling = NullValueHandling.Ignore)] - public List FileIds { get; set; } + public List FileIds { get; set; } /// /// The id of an embedded link that has been created with the Add an embed operation in the Embed area. diff --git a/Source/Podio .NET/Models/Request/ConversationCreateRequest.cs b/Source/Podio .NET/Models/Request/ConversationCreateRequest.cs index 5ecb549a..47316606 100644 --- a/Source/Podio .NET/Models/Request/ConversationCreateRequest.cs +++ b/Source/Podio .NET/Models/Request/ConversationCreateRequest.cs @@ -12,7 +12,7 @@ public class ConversationCreateRequest public string Text { get; set; } [JsonProperty("file_ids", NullValueHandling = NullValueHandling.Ignore)] - public List FileIds { get; set; } + public List FileIds { get; set; } [JsonProperty("participants", NullValueHandling = NullValueHandling.Ignore)] public List Participants { get; set; } diff --git a/Source/Podio .NET/Models/Request/ItemCreateUpdateRequest.cs b/Source/Podio .NET/Models/Request/ItemCreateUpdateRequest.cs index 7b51d89e..3a7cee14 100644 --- a/Source/Podio .NET/Models/Request/ItemCreateUpdateRequest.cs +++ b/Source/Podio .NET/Models/Request/ItemCreateUpdateRequest.cs @@ -22,7 +22,7 @@ public class ItemCreateUpdateRequest public List Tags { get; set; } [JsonProperty(PropertyName = "file_ids", NullValueHandling = NullValueHandling.Ignore)] - public List FileIds { get; set; } + public List FileIds { get; set; } [JsonProperty(PropertyName = "reminder", NullValueHandling = NullValueHandling.Ignore)] public Reminder Reminder { get; set; } diff --git a/Source/Podio .NET/Models/Request/TaskCreateUpdateRequest.cs b/Source/Podio .NET/Models/Request/TaskCreateUpdateRequest.cs index 0ccc4bbc..1e76a5a4 100644 --- a/Source/Podio .NET/Models/Request/TaskCreateUpdateRequest.cs +++ b/Source/Podio .NET/Models/Request/TaskCreateUpdateRequest.cs @@ -63,7 +63,7 @@ public DateTime? DueDate /// The list of files to attach to this task /// [JsonProperty("file_ids", NullValueHandling = NullValueHandling.Ignore)] - public IEnumerable FileIds { get; set; } + public IEnumerable FileIds { get; set; } /// /// The list of labels in text form diff --git a/Source/Podio .NET/Models/SearchResult.cs b/Source/Podio .NET/Models/SearchResult.cs index 2d568db2..3163f464 100644 --- a/Source/Podio .NET/Models/SearchResult.cs +++ b/Source/Podio .NET/Models/SearchResult.cs @@ -7,9 +7,9 @@ namespace PodioAPI.Models { public class SearchResult { - + [JsonProperty("id")] - public int Id { get; set; } + public long Id { get; set; } [JsonProperty("type")] public string Type { get; set; } @@ -43,5 +43,5 @@ public class SearchResult public JToken Highlight { get; set; } } - + } \ No newline at end of file diff --git a/Source/Podio .NET/Models/User.cs b/Source/Podio .NET/Models/User.cs index ca5f5a5d..e4f07ea9 100644 --- a/Source/Podio .NET/Models/User.cs +++ b/Source/Podio .NET/Models/User.cs @@ -19,7 +19,7 @@ public class User public string Link { get; set; } [JsonProperty("avatar", NullValueHandling = NullValueHandling.Ignore)] - public int? Avatar { get; set; } + public long? Avatar { get; set; } [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] public string Status { get; set; } diff --git a/Source/Podio .NET/Services/AppMarketService.cs b/Source/Podio .NET/Services/AppMarketService.cs index 6ee53c55..eaaf18ff 100644 --- a/Source/Podio .NET/Services/AppMarketService.cs +++ b/Source/Podio .NET/Services/AppMarketService.cs @@ -97,7 +97,7 @@ public async Task GetShare(int shareId) /// /// /// - public async Task> GetShareByReference(string refType, int refId) + public async Task> GetShareByReference(string refType, long refId) { string url = string.Format("/app_store/{0}/{1}/", refType, refId); return await _podio.Get>(url); @@ -217,7 +217,7 @@ public async Task InstallShare(int shareId, int spaceId, /// The scope the app should be shared with, either "public" or "private", defaults to "public" /// The id of the newly created share public async Task ShareApp(string refType, int refId, string name, string abstracts, string description, - string language, int[] categoryId, int[] fileId, int videoId, List features, int childrenId, + string language, int[] categoryId, long[] fileId, int videoId, List features, int childrenId, string scope = "public") { string url = "/app_store/"; @@ -237,7 +237,7 @@ public async Task ShareApp(string refType, int refId, string name, string a scope = scope }; dynamic response = await _podio.Post(url, requestData); - return (int) response["share_id"]; + return (int)response["share_id"]; } /// @@ -264,7 +264,7 @@ public async Task UnshareApp(int shareId) /// The file ids to use as screenshots for the share /// The youtube id of a introduction video, if any public async Task UpdateShare(int shareId, string name, string abstracts, string description, string language, - int[] categoryId, int[] fileId, int? videoId = null) + int[] categoryId, long[] fileId, int? videoId = null) { string url = string.Format("/app_store/{0}", shareId); dynamic requestData = new @@ -277,7 +277,7 @@ public async Task UpdateShare(int shareId, string name, string abstract file_ids = fileId, video = videoId }; - return await _podio.Put(url, requestData); + return await _podio.Put(url, requestData); } } } \ No newline at end of file diff --git a/Source/Podio .NET/Services/ApplicationService.cs b/Source/Podio .NET/Services/ApplicationService.cs index 599a893f..0e2c845f 100644 --- a/Source/Podio .NET/Services/ApplicationService.cs +++ b/Source/Podio .NET/Services/ApplicationService.cs @@ -78,7 +78,7 @@ public async System.Threading.Tasks.Task DeactivateApp(int appId) /// True if inactive apps should be included, false otherwise.Default value: false /// Additional attributes to include in query string /// - public async Task> GetAppsBySpace (int spaceId, bool includeInactive = false, Dictionary additionalAttributes = null) + public async Task> GetAppsBySpace(int spaceId, bool includeInactive = false, Dictionary additionalAttributes = null) { var requestData = new Dictionary() { @@ -216,7 +216,7 @@ public async Task DeleteAppField(int appId, int fieldId, bo { {"delete_values", deleteValues.ToString()} }; - + return await _podio.Delete(url, requestData); } @@ -355,7 +355,7 @@ public async System.Threading.Tasks.Task UpdateAppUsageInstructions(int appId, s /// public async Task InstallApp(int appId, int spaceId, string[] features = null) { - features = features == null ? new string[] {"items"} : features; + features = features == null ? new string[] { "items" } : features; string url = string.Format("/app/{0}/install", appId); dynamic requestData = new { @@ -363,7 +363,7 @@ public async Task InstallApp(int appId, int spaceId, string[] features = nu features = features }; dynamic response = await _podio.Post(url, requestData); - return (int) response["app_id"]; + return (int)response["app_id"]; } /// @@ -423,7 +423,7 @@ public async Task AddNewApp(Application application) Fields = application.Fields }; dynamic response = await _podio.Post(url, requestDate); - return (int) response["app_id"]; + return (int)response["app_id"]; } /// @@ -448,7 +448,7 @@ public async Task AddNewAppField(int appId, ApplicationField field) */ string url = string.Format("/app/{0}/field/", appId); dynamic response = await _podio.Post(url, field); - return (int) response["field_id"]; + return (int)response["field_id"]; } /// diff --git a/Source/Podio .NET/Services/BatchService.cs b/Source/Podio .NET/Services/BatchService.cs index 7585c5fc..79137af3 100644 --- a/Source/Podio .NET/Services/BatchService.cs +++ b/Source/Podio .NET/Services/BatchService.cs @@ -44,7 +44,7 @@ public async Task> GetBatches() /// /// The plugin can either be "app_import", "app_export", "space_contact_import" or "app_content". /// - public async Task> GetRunningBatches(string refType, int refId, string plugin) + public async Task> GetRunningBatches(string refType, long refId, string plugin) { string url = string.Format("/batch/{0}/{1}/{2}/running/", refType, refId, plugin); return await _podio.Get>(url); diff --git a/Source/Podio .NET/Services/CommentService.cs b/Source/Podio .NET/Services/CommentService.cs index e8a4a4e0..d7bf9391 100644 --- a/Source/Podio .NET/Services/CommentService.cs +++ b/Source/Podio .NET/Services/CommentService.cs @@ -23,7 +23,7 @@ public CommentService(Podio currentInstance) public async Task DeleteComment(int commentId) { string url = string.Format("/comment/{0}", commentId); - return await _podio.Delete(url); + return await _podio.Delete(url); } /// @@ -76,8 +76,8 @@ public async Task> GetCommentsOnObject(string type, int id) /// /// todo: describe hook parameter on AddCommentToObject /// - public async Task AddCommentToObject(string type, int id, string text, string externalId = null, - List fileIds = null, string embedUrl = null, int? embedId = null, bool alertInvite = false, + public async Task AddCommentToObject(string type, long id, string text, string externalId = null, + List fileIds = null, string embedUrl = null, int? embedId = null, bool alertInvite = false, bool silent = false, bool hook = true) { CommentCreateUpdateRequest comment = new CommentCreateUpdateRequest() @@ -108,7 +108,7 @@ public async Task AddCommentToObject(string type, int id, string text, stri /// /// todo: describe hook parameter on AddCommentToObject /// - public async Task AddCommentToObject(string type, int id, CommentCreateUpdateRequest comment, bool alertInvite = false, + public async Task AddCommentToObject(string type, long id, CommentCreateUpdateRequest comment, bool alertInvite = false, bool silent = false, bool hook = true) { string url = string.Format("/comment/{0}/{1}/", type, id); @@ -131,7 +131,7 @@ public async Task AddCommentToObject(string type, int id, CommentCreateUpda /// The id of an embedded link that has been created with the Add an embed operation in the Embed /// area /// - public async Task UpdateComment(int commentId, string text, string externalId = null, List fileIds = null, + public async Task UpdateComment(int commentId, string text, string externalId = null, List fileIds = null, string embedUrl = null, int? embedId = null) { var requestData = new CommentCreateUpdateRequest() @@ -142,7 +142,7 @@ public async Task UpdateComment(int commentId, string text, string ext EmbedUrl = embedUrl, EmbedId = embedId }; - return await UpdateComment(commentId, requestData); + return await UpdateComment(commentId, requestData); } /// @@ -154,7 +154,7 @@ public async Task UpdateComment(int commentId, string text, string ext public async Task UpdateComment(int commentId, CommentCreateUpdateRequest comment) { string url = string.Format("/comment/{0}", commentId); - return await _podio.Put(url, comment); + return await _podio.Put(url, comment); } } } \ No newline at end of file diff --git a/Source/Podio .NET/Services/ConversationService.cs b/Source/Podio .NET/Services/ConversationService.cs index e8c71caf..11dcee51 100644 --- a/Source/Podio .NET/Services/ConversationService.cs +++ b/Source/Podio .NET/Services/ConversationService.cs @@ -51,7 +51,7 @@ public async Task CreateConversation(ConversationCreateRequest con /// /// /// - public async Task CreateConversationOnObject(string refType, int refId, + public async Task CreateConversationOnObject(string refType, long refId, ConversationCreateRequest conversationCreateRequest) { string url = string.Format("/conversation/{0}/{1}/", refType, refId); @@ -127,7 +127,7 @@ public async Task> GetConversations(int limit = 10, int offse /// /// /// - public async Task> GetConversationsOnObject(string refType, int refId) + public async Task> GetConversationsOnObject(string refType, long refId) { string url = string.Format("/conversation/{0}/{1}/", refType, refId); return await _podio.Get>(url); @@ -233,7 +233,7 @@ public async Task MarkConversationAsUnread(int converstionId) /// /// The url to be attached /// - public async Task ReplyToConversation(int converstionId, string text, List fileIds = null, + public async Task ReplyToConversation(int converstionId, string text, List fileIds = null, int? embedId = null, string embedUrl = null) { string url = string.Format("/conversation/{0}/reply/v2", converstionId); diff --git a/Source/Podio .NET/Services/FileService.cs b/Source/Podio .NET/Services/FileService.cs index 063cb758..eb8c6ee2 100644 --- a/Source/Podio .NET/Services/FileService.cs +++ b/Source/Podio .NET/Services/FileService.cs @@ -21,7 +21,7 @@ public FileService(Podio currentInstance) /// /// /// - public async Task GetFile(int fileId) + public async Task GetFile(long fileId) { string url = string.Format("/file/{0}", fileId); return await _podio.Get(url); @@ -92,7 +92,7 @@ public async Task UploadFileFromUrl(string fileUrl) /// /// The new description of the file /// - public async System.Threading.Tasks.Task UpdateFile(int fileId, string description) + public async System.Threading.Tasks.Task UpdateFile(long fileId, string description) { string url = string.Format("/file/{0}", fileId); dynamic requestData = new @@ -107,7 +107,7 @@ public async System.Threading.Tasks.Task UpdateFile(int fileId, string descripti /// Podio API Reference: https://developers.podio.com/doc/files/delete-file-22453 /// /// - public async System.Threading.Tasks.Task DeleteFile(int fileId) + public async System.Threading.Tasks.Task DeleteFile(long fileId) { string url = string.Format("/file/{0}", fileId); await _podio.Delete(url); @@ -120,7 +120,7 @@ public async System.Threading.Tasks.Task DeleteFile(int fileId) /// The id of the old file that should be replacd with the new file /// /// - public async System.Threading.Tasks.Task ReplaceFile(int oldFileId, int fileId) + public async System.Threading.Tasks.Task ReplaceFile(long oldFileId, long fileId) { string url = string.Format("/file/{0}/replace", fileId); dynamic requestData = new @@ -141,7 +141,7 @@ public async System.Threading.Tasks.Task ReplaceFile(int oldFileId, int fileId) /// /// /// - public async System.Threading.Tasks.Task AttachFile(int fileId, string refType, int refId) + public async System.Threading.Tasks.Task AttachFile(long fileId, string refType, long refId) { string url = string.Format("/file/{0}/attach", fileId); dynamic requestData = new @@ -158,7 +158,7 @@ public async System.Threading.Tasks.Task AttachFile(int fileId, string refType, /// /// /// The id of the newly created file - public async Task CopyFile(int fileId) + public async Task CopyFile(long fileId) { string url = string.Format("/file/{0}/copy", fileId); dynamic response = await _podio.Post(url); diff --git a/Source/Podio .NET/Services/GrantService.cs b/Source/Podio .NET/Services/GrantService.cs index b09c3bdc..5d3089a8 100644 --- a/Source/Podio .NET/Services/GrantService.cs +++ b/Source/Podio .NET/Services/GrantService.cs @@ -63,7 +63,7 @@ public async Task GetOwnGrantInformation(string refType, dynamic refId) public async Task RemoveGrant(string refType, dynamic refId, int userId) { string url = string.Format("/grant/{0}/{1}/{2}", refType, refId, userId); - return await _podio.Delete(url); + return await _podio.Delete(url); } /// @@ -101,8 +101,8 @@ public async Task> GetOwnGrantsOnOrg(int orgId) /// The action required of the people, either "view", "comment" or "rate", or left out /// Any special message to the users /// - public async Task CreateGrant(string refType, int refId, List people, string action, - string message = null) + //public async Task CreateGrant(string refType, int refId, List people, string action, string message = null) + public async Task CreateGrant(string refType, long refId, List people, string action, string message = null) { string url = string.Format("/grant/{0}/{1}", refType, refId); dynamic requestData = new diff --git a/Source/Podio .NET/Services/ImporterService.cs b/Source/Podio .NET/Services/ImporterService.cs index d0508252..887f1575 100644 --- a/Source/Podio .NET/Services/ImporterService.cs +++ b/Source/Podio .NET/Services/ImporterService.cs @@ -20,7 +20,7 @@ public ImporterService(Podio currentInstance) /// /// /// - public async Task GetInfo(int fileId) + public async Task GetInfo(long fileId) { string url = string.Format("/importer/{0}/info", fileId); return await _podio.Get(url); @@ -37,7 +37,7 @@ public async Task GetInfo(int fileId) /// The id of the column to read tags from, if any /// The id of the column to read the app item id from, if any /// - public async Task ImportAppItems(int fileId, int appId, List mappings, string tagsColumnId = null, + public async Task ImportAppItems(long fileId, int appId, List mappings, string tagsColumnId = null, string appItemIdColumnId = null) { string url = string.Format("/importer/{0}/item/app/{1}", fileId, appId); @@ -60,7 +60,7 @@ public async Task ImportAppItems(int fileId, int appId, List /// The mappings of the fields on the contact /// - public async Task ImportSpaceContacts(int fileId, int spaceId, List mappings) + public async Task ImportSpaceContacts(long fileId, int spaceId, List mappings) { string url = string.Format("/importer/{0}/contact/space/{1}", fileId, spaceId); dynamic requestData = new @@ -79,7 +79,7 @@ public async Task ImportSpaceContacts(int fileId, int spaceId, List /// /// - public async Task GetPreview(int fileId, string row, List mappings) + public async Task GetPreview(long fileId, string row, List mappings) { string url = string.Format("/importer/{0}/preview/{1}", fileId, row); dynamic requestData = new diff --git a/Source/Podio .NET/Services/ItemService.cs b/Source/Podio .NET/Services/ItemService.cs index 8e503f5b..a5f94016 100644 --- a/Source/Podio .NET/Services/ItemService.cs +++ b/Source/Podio .NET/Services/ItemService.cs @@ -31,7 +31,7 @@ public ItemService(Podio currentInstance) /// /// If set to false, hooks will not be executed for the change /// Id of the created item - public async Task AddNewItem(int appId, Item item, int? spaceId = null, bool silent = false, bool hook = true) + public async Task AddNewItem(int appId, Item item, int? spaceId = null, bool silent = false, bool hook = true) { JArray fieldValues = JArray.FromObject(item.Fields.Select(f => new { external_id = f.ExternalId, field_id = f.FieldId, values = f.Values })); @@ -67,7 +67,7 @@ public async Task AddNewItem(int appId, Item item, int? spaceId = null, boo /// /// If set to false, hooks will not be executed for the change /// The id of the new revision / null if no change - public async Task UpdateItem(Item item, int? spaceId = null, int? revision = null, bool silent = false, bool hook = true) + public async Task UpdateItem(Item item, int? spaceId = null, int? revision = null, bool silent = false, bool hook = true) { JArray fieldValues = JArray.FromObject( @@ -108,7 +108,7 @@ public async Task AddNewItem(int appId, Item item, int? spaceId = null, boo /// /// If set to false, hooks will not be executed for the change /// The id of the new revision / null if no change - public async Task UpdateItemFieldValues(Item item, bool silent = false, bool hook = true) + public async Task UpdateItemFieldValues(Item item, bool silent = false, bool hook = true) { /* Example Usage: Updating a text field @@ -153,7 +153,7 @@ public async Task AddNewItem(int appId, Item item, int? spaceId = null, boo /// /// If set to false, hooks will not be executed for the change /// The id of the new revision / null if no change - public async Task UpdateItemValues(Item item, bool silent = false, bool hook = true) + public async Task UpdateItemValues(Item item, bool silent = false, bool hook = true) { /* Example Usage: Updating a text field and a date field @@ -188,7 +188,7 @@ public async Task AddNewItem(int appId, Item item, int? spaceId = null, boo /// If true marks any new notifications on the given item as viewed, otherwise leaves any /// notifications untouched, Default value true /// - public async Task GetItem(int itemId, bool markedAsViewed = true) + public async Task GetItem(long itemId, bool markedAsViewed = true) { string markAsViewdValue = markedAsViewed == true ? "1" : "0"; var requestData = new Dictionary() @@ -210,7 +210,7 @@ public async Task GetItem(int itemId, bool markedAsViewed = true) /// notifications untouched, Default value true /// /// - public async Task GetItemBasic(int itemId, bool markedAsViewed = true) + public async Task GetItemBasic(long itemId, bool markedAsViewed = true) { string viewedVal = markedAsViewed == true ? "1" : "0"; var requestData = new Dictionary() @@ -357,7 +357,7 @@ public async Task BulkDeleteItems(int appId, BulkDeleteReque /// generated /// /// The id of the cloned item - public async Task CloneItem(int itemId, bool silent = false) + public async Task CloneItem(long itemId, bool silent = false) { string url = string.Format("/item/{0}/clone", itemId); url = Utility.PrepareUrlWithOptions(url, new CreateUpdateOptions(silent)); @@ -375,7 +375,7 @@ public async Task CloneItem(int itemId, bool silent = false) /// generated /// /// If set to false, hooks will not be executed for the change - public async System.Threading.Tasks.Task DeleteItem(int itemId, bool silent = false, bool hook = true) + public async System.Threading.Tasks.Task DeleteItem(long itemId, bool silent = false, bool hook = true) { string url = string.Format("/item/{0}", itemId); url = Utility.PrepareUrlWithOptions(url, new CreateUpdateOptions(silent, hook)); @@ -387,7 +387,7 @@ public async System.Threading.Tasks.Task DeleteItem(int itemId, bool silent = fa /// Podio API Reference: https://developers.podio.com/doc/items/delete-item-reference-7302326 /// /// - public async System.Threading.Tasks.Task DeleteItemReference(int itemId) + public async System.Threading.Tasks.Task DeleteItemReference(long itemId) { string url = string.Format("/item/{0}/ref", itemId); await _podio.Delete(url); @@ -472,7 +472,7 @@ public async Task> FilterItemsByView(int appId, int viewId /// The maximum number of results to return Default value: 13 /// If supplied the items with these ids will not be returned /// - public async Task> GetTopValuesByField(int fieldId, int limit = 13, int[] notItemIds = null) + public async Task> GetTopValuesByField(int fieldId, int limit = 13, long[] notItemIds = null) { string itemIdCSV = Utility.ArrayToCSV(notItemIds); var requestData = new Dictionary() @@ -509,7 +509,7 @@ public async Task GetAppValues(int appId) /// /// /// - public async Task GetItemFieldValues(int itemId, int fieldId) where T : new() + public async Task GetItemFieldValues(long itemId, int fieldId) where T : new() { string url = string.Format("/item/{0}/value/{1}", itemId, fieldId); return await _podio.Get(url); @@ -522,7 +522,7 @@ public async Task GetAppValues(int appId) /// /// /// - public async Task GetItemBasicByField(int itemId, string fieldId) + public async Task GetItemBasicByField(long itemId, string fieldId) { string url = string.Format("/item/{0}/reference/{1}/preview", itemId, fieldId); return await _podio.Get(url); @@ -535,7 +535,7 @@ public async Task GetItemBasicByField(int itemId, string fieldId) /// /// /// - public async Task> GetItemReferences(int itemId) + public async Task> GetItemReferences(long itemId) { string url = string.Format("/item/{0}/reference/", itemId); return await _podio.Get>(url); @@ -573,7 +573,7 @@ public async Task GetFieldRanges(int fieldId) /// /// /// - public async Task> GetItemValues(int itemId) + public async Task> GetItemValues(long itemId) { string url = string.Format("/item/{0}/value", itemId); return await _podio.Get>(url); @@ -584,8 +584,9 @@ public async Task> GetItemValues(int itemId) /// Podio API Reference : https://developers.podio.com/doc/items/get-item-revision-22373 /// /// + /// /// - public async Task GetItemRevision(int itemId, int revision) + public async Task GetItemRevision(long itemId, int revision) { string url = string.Format("/item/{0}/revision/{1}", itemId, revision); return await _podio.Get(url); @@ -597,7 +598,7 @@ public async Task GetItemRevision(int itemId, int revision) /// /// /// - public async Task> GetItemRevisions(int itemId) + public async Task> GetItemRevisions(long itemId) { string url = string.Format("/item/{0}/revision/", itemId); return await _podio.Get>(url); @@ -610,7 +611,7 @@ public async Task> GetItemRevisions(int itemId) /// /// /// - public async Task GetMeetingUrl(int itemId) + public async Task GetMeetingUrl(long itemId) { string url = string.Format("/item/{0}/meeting/url", itemId); dynamic response = await _podio.Get(url); @@ -626,7 +627,7 @@ public async Task GetMeetingUrl(int itemId) /// /// /// The new status, either "invited", "accepted", "declined" or "tentative" - public async System.Threading.Tasks.Task SetParticipation(int itemId, string status) + public async System.Threading.Tasks.Task SetParticipation(long itemId, string status) { dynamic requestData = new { @@ -644,7 +645,7 @@ public async System.Threading.Tasks.Task SetParticipation(int itemId, string sta /// /// /// - public async Task> GetReferencesToItemByField(int itemId, int fieldId, int limit = 20) + public async Task> GetReferencesToItemByField(long itemId, int fieldId, int limit = 20) { var requestData = new Dictionary() { @@ -661,7 +662,7 @@ public async Task> GetReferencesToItemByField(int itemId, int fi /// /// The type of the reference /// The id of the reference - public async System.Threading.Tasks.Task UpdateItemReference(int itemId, string type, int referenceId) + public async System.Threading.Tasks.Task UpdateItemReference(long itemId, string type, int referenceId) { dynamic requestData = new { @@ -680,7 +681,7 @@ public async System.Threading.Tasks.Task UpdateItemReference(int itemId, string /// /// /// The id of the new revision - public async Task RevertItemRevision(int itemId, int revisionId) + public async Task RevertItemRevision(long itemId, int revisionId) { var url = string.Format("/item/{0}/revision/{1}", itemId, revisionId); var response = await _podio.Delete(url); @@ -698,7 +699,7 @@ public async System.Threading.Tasks.Task UpdateItemReference(int itemId, string /// /// /// revision - public async Task RevertToRevision(int itemId, int revision) + public async Task RevertToRevision(long itemId, int revision) { var url = string.Format("/item/{0}/revision/{1}/revert_to", itemId, revision); var response = await _podio.Delete(url); @@ -723,7 +724,7 @@ public async System.Threading.Tasks.Task UpdateItemReference(int itemId, string /// /// The text to search for. The search will be lower case, and with a wildcard in each end. /// - public async Task> FindReferenceableItems(int fieldId, int limit = 13, int[] notItemIds = null, + public async Task> FindReferenceableItems(int fieldId, int limit = 13, long[] notItemIds = null, string sort = null, string text = null) { string itemIdCSV = Utility.ArrayToCSV(notItemIds); @@ -744,7 +745,7 @@ public async Task> FindReferenceableItems(int fieldId, int limit = 13 /// /// /// - public async Task GetItemClone(int itemId) + public async Task GetItemClone(long itemId) { string url = string.Format("/item/{0}/clone", itemId); return await _podio.Get(url); @@ -758,13 +759,13 @@ public async Task GetItemClone(int itemId) /// /// /// - public async Task> GetItemRevisionDifference(int itemId, int revisionFrom, int revisionTo) + public async Task> GetItemRevisionDifference(long itemId, int revisionFrom, int revisionTo) { string url = string.Format("/item/{0}/revision/{1}/{2}", itemId, revisionFrom, revisionTo); return await _podio.Get>(url); } - public async Task Calcualate(int itemId, ItemCalculateRequest ItemCalculateRequest, int limit = 30) + public async Task Calcualate(long itemId, ItemCalculateRequest ItemCalculateRequest, int limit = 30) { ItemCalculateRequest.Limit = ItemCalculateRequest.Limit == 0 ? 30 : ItemCalculateRequest.Limit; string url = string.Format("/item/app/{0}/calculate", itemId); diff --git a/Source/Podio .NET/Services/NotificationService.cs b/Source/Podio .NET/Services/NotificationService.cs index f6ebff90..ab934b43 100644 --- a/Source/Podio .NET/Services/NotificationService.cs +++ b/Source/Podio .NET/Services/NotificationService.cs @@ -35,7 +35,7 @@ public async Task GetInboxNewCount() public async Task StarNotification(int notificationId) { string url = string.Format("/notification/{0}/star", notificationId); - return await _podio.Post(url); + return await _podio.Post(url); } /// @@ -46,7 +46,7 @@ public async Task StarNotification(int notificationId) public async Task UnStarNotification(int notificationId) { string url = string.Format("/notification/{0}/star", notificationId); - return await _podio.Delete(url); + return await _podio.Delete(url); } /// @@ -61,7 +61,7 @@ public async Task UnStarNotification(int notificationId) public async Task MarkNotificationsAsViewedByRef(string refType, int refId) { string url = string.Format("/notification/{0}/{1}/viewed", refType, refId); - return await _podio.Post(url); + return await _podio.Post(url); } /// @@ -72,7 +72,7 @@ public async Task MarkNotificationsAsViewedByRef(string refType, int re public async Task MarkNotificationAsViewed(int notificationId) { string url = string.Format("/notification/{0}/viewed", notificationId); - return await _podio.Post(url); + return await _podio.Post(url); } /// @@ -82,7 +82,7 @@ public async Task MarkNotificationAsViewed(int notificationId) public async Task MarkAllNotificationsAsViewed() { string url = "/notification/viewed"; - return await _podio.Post(url); + return await _podio.Post(url); } /// diff --git a/Source/Podio .NET/Services/QuestionService.cs b/Source/Podio .NET/Services/QuestionService.cs index d49eb0e7..93ef2e1d 100644 --- a/Source/Podio .NET/Services/QuestionService.cs +++ b/Source/Podio .NET/Services/QuestionService.cs @@ -26,7 +26,7 @@ public async Task AnswerQuestion(int questionId, int questionOptionId) { question_option_id = questionOptionId }; - return await _podio.Post(url, requestData); + return await _podio.Post(url, requestData); } /// @@ -50,7 +50,7 @@ public async Task> GetAnswers(int questionId) /// The text of the question. /// The list of text for the option /// - public async Task CreateQuestion(string refType, int refId, string questionText, List options) + public async Task CreateQuestion(string refType, long refId, string questionText, List options) { string url = string.Format("/question/{0}/{1}/", refType, refId); dynamic requestData = new diff --git a/Source/Podio .NET/Services/RatingService.cs b/Source/Podio .NET/Services/RatingService.cs index 668c2868..236dcac7 100644 --- a/Source/Podio .NET/Services/RatingService.cs +++ b/Source/Podio .NET/Services/RatingService.cs @@ -23,7 +23,7 @@ public RatingService(Podio currentInstance) /// /// The value of the rating, see the area for information on the value to use. /// The id of the rating created. - public async Task AddRating(string refType, int refId, string ratingType, int value) + public async Task AddRating(string refType, long refId, string ratingType, int value) { string url = string.Format("/rating/{0}/{1}/{2}", refType, refId, ratingType); dynamic requestData = new @@ -41,7 +41,7 @@ public async Task AddRating(string refType, int refId, string ratingType, i /// /// /// - public async Task GetLikeCount(string refType, int refId) + public async Task GetLikeCount(string refType, long refId) { string url = string.Format("/rating/{0}/{1}/like_count", refType, refId); dynamic response = await _podio.Get(url); @@ -57,7 +57,7 @@ public async Task GetLikeCount(string refType, int refId) /// /// /// - public async Task GetRating(string refType, int refId, string ratingType, int userId) + public async Task GetRating(string refType, long refId, string ratingType, int userId) { string url = string.Format("/rating/{0}/{1}/{2}/{3}", refType, refId, ratingType, userId); dynamic response = await _podio.Get(url); @@ -72,7 +72,7 @@ public async Task GetRating(string refType, int refId, string ratingType, i /// /// /// - public async Task GetRatingOwn(string refType, int refId, string ratingType) + public async Task GetRatingOwn(string refType, long refId, string ratingType) { string url = string.Format("/rating/{0}/{1}/{2}/self", refType, refId, ratingType); dynamic response = await _podio.Get(url); @@ -87,7 +87,7 @@ public async Task GetRatingOwn(string refType, int refId, string ratingType /// /// How many profiles that liked something to return. Default value: 10 /// - public async Task> GetWhoLikedAnObject(string refType, int refId, int limit = 10) + public async Task> GetWhoLikedAnObject(string refType, long refId, int limit = 10) { string url = string.Format("/rating/{0}/{1}/liked_by/", refType, refId); Dictionary requestData = new Dictionary() @@ -104,7 +104,7 @@ public async Task> GetWhoLikedAnObject(string refType, int refId, /// /// /// - public async Task RemoveRating(string refType, int refId, string ratingType) + public async Task RemoveRating(string refType, long refId, string ratingType) { string url = string.Format("/rating/{0}/{1}/{2}", refType, refId, ratingType); return await _podio.Delete(url); @@ -117,7 +117,7 @@ public async Task RemoveRating(string refType, int refId, string rating /// /// /// - public async Task GetAllRatings(string refType, int refId) + public async Task GetAllRatings(string refType, long refId) { string url = string.Format("/rating/{0}/{1}", refType, refId); return await _podio.Get(url); @@ -131,7 +131,7 @@ public async Task GetAllRatings(string refType, int refId) /// /// /// - public async Task GetRatings(string refType, int refId, string ratingType) + public async Task GetRatings(string refType, long refId, string ratingType) { string url = string.Format("/rating/{0}/{1}/{2}", refType, refId, ratingType); return await _podio.Get(url); diff --git a/Source/Podio .NET/Services/ReminderService.cs b/Source/Podio .NET/Services/ReminderService.cs index 35812166..1cf7b69a 100644 --- a/Source/Podio .NET/Services/ReminderService.cs +++ b/Source/Podio .NET/Services/ReminderService.cs @@ -3,11 +3,11 @@ namespace PodioAPI.Services { public class ReminderService { - private readonly Podio _podio; + private readonly Podio _podio; public ReminderService(Podio currentInstance) { - _podio = currentInstance; + _podio = currentInstance; } /// diff --git a/Source/Podio .NET/Services/SpaceService.cs b/Source/Podio .NET/Services/SpaceService.cs index 50ca45ce..e0fdad43 100644 --- a/Source/Podio .NET/Services/SpaceService.cs +++ b/Source/Podio .NET/Services/SpaceService.cs @@ -65,7 +65,7 @@ public async Task UpdateSpace(int spaceId, string name = null, string u post_on_new_app = postOnNewApp, post_on_new_member = postOnNewMember }; - return await _podio.Put(url, requestData); + return await _podio.Put(url, requestData); } /// diff --git a/Source/Podio .NET/Services/StatusService.cs b/Source/Podio .NET/Services/StatusService.cs index a7f6c89e..9ae981de 100644 --- a/Source/Podio .NET/Services/StatusService.cs +++ b/Source/Podio .NET/Services/StatusService.cs @@ -41,7 +41,7 @@ public async Task GetStatusMessage(int statusId) /// The text of the question if any /// The list of answer options as strings /// - public async Task AddNewStatusMessage(int spaceId, string text, List fileIds = null, int? embedId = null, + public async Task AddNewStatusMessage(int spaceId, string text, List fileIds = null, int? embedId = null, string embedUrl = null, string questionText = null, List questionOptions = null) { string url = string.Format("/status/space/{0}/", spaceId); @@ -75,7 +75,7 @@ public async Task AddNewStatusMessage(int spaceId, string text, List /// The url to be attached - public async Task UpdateStatusMessage(int statusId, string text, List fileIds = null, int? embedId = null, + public async Task UpdateStatusMessage(int statusId, string text, List fileIds = null, int? embedId = null, string embedUrl = null) { string url = string.Format("/status/{0}", statusId); diff --git a/Source/Podio .NET/Services/TagService.cs b/Source/Podio .NET/Services/TagService.cs index 131cac3e..96a700e9 100644 --- a/Source/Podio .NET/Services/TagService.cs +++ b/Source/Podio .NET/Services/TagService.cs @@ -22,7 +22,7 @@ public TagService(Podio currentInstance) /// /// /// - public async Task CreateTags(string refType, int refId, List tags) + public async Task CreateTags(string refType, long refId, List tags) { string url = string.Format("/tag/{0}/{1}/", refType, refId); return await _podio.Post(url, tags); @@ -169,7 +169,7 @@ public async Task> GetTagsOnSpace(int spaceId, int? limit = null, stri /// /// /// The tag to search for - public async Task RemoveTag(string refType, int refId, string text) + public async Task RemoveTag(string refType, long refId, string text) { string url = string.Format("/tag/{0}/{1}?text={2}", refType, refId, text); return await _podio.Delete(url); @@ -183,7 +183,7 @@ public async Task RemoveTag(string refType, int refId, string text) /// /// /// - public async Task UpdateTags(string refType, int refId, List tags) + public async Task UpdateTags(string refType, long refId, List tags) { string url = string.Format("/tag/{0}/{1}/", refType, refId); return await _podio.Put(url, tags); diff --git a/Source/Podio .NET/Services/TaskService.cs b/Source/Podio .NET/Services/TaskService.cs index 22985598..4db98a22 100644 --- a/Source/Podio .NET/Services/TaskService.cs +++ b/Source/Podio .NET/Services/TaskService.cs @@ -73,7 +73,7 @@ public async Task GetTaskSummaryForPersonal(int limit = 4) /// /// /// - public async Task GetTaskSummaryForReference(string refType, int refId, int limit = 4) + public async Task GetTaskSummaryForReference(string refType, long refId, int limit = 4) { string url = string.Format("/task/{0}/{1}/summary", refType, refId); var requestData = new Dictionary() @@ -107,7 +107,7 @@ public async Task GetTaskSummaryForSpace(int spaceId, int limit = 4 /// /// /// - public async Task GetTaskCount(string refType, int refId) + public async Task GetTaskCount(string refType, long refId) { string url = string.Format("/task/{0}/{1}/count", refType, refId); dynamic response = await _podio.Get(url); @@ -185,7 +185,7 @@ public async System.Threading.Tasks.Task IncompleteTask(int taskId, bool hook = /// generated. Default value: false /// /// - public async Task> CreateTask(TaskCreateUpdateRequest task, string refType = null, int? refId = null, + public async Task> CreateTask(TaskCreateUpdateRequest task, string refType = null, long? refId = null, bool hook = true, bool silent = false) { string url = "/task/"; @@ -227,7 +227,7 @@ public async System.Threading.Tasks.Task IncompleteTask(int taskId, bool hook = /// /// public async Task> CreateTask(string text, DateTime? dueDate = null, string description = null, - int? responsible = null, bool isPrivate = true, string refType = null, int? refId = null, bool hook = true, + int? responsible = null, bool isPrivate = true, string refType = null, long? refId = null, bool hook = true, bool silent = false) { var task = new TaskCreateUpdateRequest @@ -438,7 +438,7 @@ public async System.Threading.Tasks.Task UpdateTaskLabels(int taskId, List /// /// /// - public async System.Threading.Tasks.Task UpdateTaskReference(int taskId, string refType, int refId, bool hook = true, bool silent = false) + public async System.Threading.Tasks.Task UpdateTaskReference(int taskId, string refType, long refId, bool hook = true, bool silent = false) { string url = string.Format("/task/{0}/ref", taskId); url = Utility.PrepareUrlWithOptions(url, new CreateUpdateOptions(silent, hook)); diff --git a/Source/Podio .NET/Services/WidgetService.cs b/Source/Podio .NET/Services/WidgetService.cs index ad9f6b82..2e2723cd 100644 --- a/Source/Podio .NET/Services/WidgetService.cs +++ b/Source/Podio .NET/Services/WidgetService.cs @@ -53,7 +53,7 @@ public async Task UpdateWidget(int widgetId, string title, dynamic conf config = config }; - return await _podio.Put(url, requestData); + return await _podio.Put(url, requestData); } /// @@ -85,7 +85,7 @@ public async Task CloneWidget(int widgetId, string type, string id) public async Task DeleteWidget(int widgetId) { string url = string.Format("/widget/{0}", widgetId); - return await _podio.Delete(url); + return await _podio.Delete(url); } /// diff --git a/Source/Podio .NET/Utils/ItemFields/AppItemField.cs b/Source/Podio .NET/Utils/ItemFields/AppItemField.cs index 0ef22493..7db30132 100644 --- a/Source/Podio .NET/Utils/ItemFields/AppItemField.cs +++ b/Source/Podio .NET/Utils/ItemFields/AppItemField.cs @@ -11,7 +11,7 @@ public IEnumerable Items get { return this.ValuesAs(); } } - public IEnumerable ItemIds + public IEnumerable ItemIds { set { @@ -25,7 +25,7 @@ public IEnumerable ItemIds } } - public int ItemId + public long ItemId { set { diff --git a/Source/Podio .NET/Utils/ItemFields/DateItemField.cs b/Source/Podio .NET/Utils/ItemFields/DateItemField.cs index 764be2e8..baac0625 100644 --- a/Source/Podio .NET/Utils/ItemFields/DateItemField.cs +++ b/Source/Podio .NET/Utils/ItemFields/DateItemField.cs @@ -51,6 +51,7 @@ public DateTime? StartDate return null; } } + set { setStartDate(value, "start_date"); } } public DateTime? EndDate @@ -81,6 +82,7 @@ public string StartTime return null; } } + set { setStartTime(value, "start_time"); } } public string EndTime @@ -96,6 +98,7 @@ public string EndTime return null; } } + set { setEndTime(value, "end_time"); } } protected void setDateTime(DateTime? value, string attribute) @@ -108,5 +111,38 @@ protected void setDateTime(DateTime? value, string attribute) } this.Values.First()[attribute] = stringValue; } + + protected void setStartDate(DateTime? value, string attribute) + { + EnsureValuesInitialized(true); + string stringValue = null; + if (value != null) + { + stringValue = String.Format("{0:yyyy-MM-dd}", value); + } + this.Values.First()[attribute] = stringValue; + } + protected void setStartTime(string value, string attribute) + { + EnsureValuesInitialized(includeFirstChildDict: true); + string stringValue = null; + if (!string.IsNullOrEmpty(value)) + { + stringValue = String.Format("{0:HH:mm:ss}", value); + } + + base.Values.First()[attribute] = stringValue; + } + protected void setEndTime(string value, string attribute) + { + EnsureValuesInitialized(includeFirstChildDict: true); + string stringValue = null; + if (!string.IsNullOrEmpty(value)) + { + stringValue = String.Format("{0:HH:mm:ss}", value); + } + + base.Values.First()[attribute] = stringValue; + } } } \ No newline at end of file diff --git a/Source/Podio .NET/Utils/ItemFields/EmbedItemField.cs b/Source/Podio .NET/Utils/ItemFields/EmbedItemField.cs index 02dfe845..aa258b15 100644 --- a/Source/Podio .NET/Utils/ItemFields/EmbedItemField.cs +++ b/Source/Podio .NET/Utils/ItemFields/EmbedItemField.cs @@ -37,7 +37,7 @@ public IEnumerable Embeds } } - public void AddEmbed(int embedId, int? fileId = null) + public void AddEmbed(int embedId, long? fileId = null) { EnsureValuesInitialized(); var jobject = new JObject(); diff --git a/Source/Podio .NET/Utils/ItemFields/ImageItemField.cs b/Source/Podio .NET/Utils/ItemFields/ImageItemField.cs index aca3ea5c..3657b709 100644 --- a/Source/Podio .NET/Utils/ItemFields/ImageItemField.cs +++ b/Source/Podio .NET/Utils/ItemFields/ImageItemField.cs @@ -11,7 +11,7 @@ public IEnumerable Images get { return this.ValuesAs(); } } - public IEnumerable FileIds + public IEnumerable FileIds { set { @@ -25,7 +25,7 @@ public IEnumerable FileIds } } - public int FileId + public long FileId { set { diff --git a/Source/Podio .NET/Utils/Utilities.cs b/Source/Podio .NET/Utils/Utilities.cs index 5cf87955..0c854349 100644 --- a/Source/Podio .NET/Utils/Utilities.cs +++ b/Source/Podio .NET/Utils/Utilities.cs @@ -26,6 +26,13 @@ internal static string ArrayToCSV(string[] array, string splitter = ",") return string.Empty; } + internal static string ArrayToCSV(long[] array, string splitter = ",") + { + if (array != null && array.Length > 0) + return string.Join(splitter, array); + + return string.Empty; + } /// /// Convert dictionay to to query string ///