Skip to content

Commit 3e41562

Browse files
More comment id int -> long
1 parent b061c5f commit 3e41562

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ obj
3939
Source/packages/*
4040

4141
Source/.vs/*
42-
project.lock.json
42+
project.lock.json
43+
/.vs

Source/Podio .NET/Models/Comment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace PodioAPI.Models
77
public class Comment
88
{
99
[JsonProperty("comment_id")]
10-
public int CommentId { get; set; }
10+
public long CommentId { get; set; }
1111

1212
[JsonProperty("value")]
1313
public string Value { get; set; }

Source/Podio .NET/Services/CommentService.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public CommentService(Podio currentInstance)
2020
/// <para>Podio API Reference: https://developers.podio.com/doc/comments/delete-a-comment-22347 </para>
2121
/// </summary>
2222
/// <param name="commentId"></param>
23-
public async Task<dynamic> DeleteComment(int commentId)
23+
public async Task<dynamic> DeleteComment(long commentId)
2424
{
2525
string url = string.Format("/comment/{0}", commentId);
2626
return await _podio.Delete<dynamic>(url);
@@ -32,7 +32,7 @@ public async Task<dynamic> DeleteComment(int commentId)
3232
/// </summary>
3333
/// <param name="commentId"></param>
3434
/// <returns></returns>
35-
public async Task<Comment> GetComment(int commentId)
35+
public async Task<Comment> GetComment(long commentId)
3636
{
3737
string url = string.Format("/comment/{0}", commentId);
3838
return await _podio.Get<Comment>(url);
@@ -76,7 +76,7 @@ public async Task<List<Comment>> GetCommentsOnObject(string type, long id)
7676
/// </param>
7777
/// <param name="hook">todo: describe hook parameter on AddCommentToObject</param>
7878
/// <returns></returns>
79-
public async Task<int> AddCommentToObject(string type, long id, string text, string externalId = null,
79+
public async Task<long> AddCommentToObject(string type, long id, string text, string externalId = null,
8080
List<int> fileIds = null, string embedUrl = null, int? embedId = null, bool alertInvite = false,
8181
bool silent = false, bool hook = true)
8282
{
@@ -108,13 +108,13 @@ public async Task<int> AddCommentToObject(string type, long id, string text, str
108108
/// </param>
109109
/// <param name="hook">todo: describe hook parameter on AddCommentToObject</param>
110110
/// <returns></returns>
111-
public async Task<int> AddCommentToObject(string type, long id, CommentCreateUpdateRequest comment, bool alertInvite = false,
111+
public async Task<long> AddCommentToObject(string type, long id, CommentCreateUpdateRequest comment, bool alertInvite = false,
112112
bool silent = false, bool hook = true)
113113
{
114114
string url = string.Format("/comment/{0}/{1}/", type, id);
115115
url = Utility.PrepareUrlWithOptions(url, new CreateUpdateOptions(silent, hook, null, alertInvite));
116116
dynamic response = await _podio.Post<dynamic>(url, comment);
117-
return (int) response["comment_id"];
117+
return (long) response["comment_id"];
118118
}
119119

120120
/// <summary>
@@ -131,7 +131,7 @@ public async Task<int> AddCommentToObject(string type, long id, CommentCreateUpd
131131
/// The id of an embedded link that has been created with the Add an embed operation in the Embed
132132
/// area
133133
/// </param>
134-
public async Task<dynamic> UpdateComment(int commentId, string text, string externalId = null, List<int> fileIds = null,
134+
public async Task<dynamic> UpdateComment(long commentId, string text, string externalId = null, List<int> fileIds = null,
135135
string embedUrl = null, int? embedId = null)
136136
{
137137
var requestData = new CommentCreateUpdateRequest()
@@ -151,7 +151,7 @@ public async Task<dynamic> UpdateComment(int commentId, string text, string ext
151151
/// </summary>
152152
/// <param name="commentId"></param>
153153
/// <param name="comment"></param>
154-
public async Task<dynamic> UpdateComment(int commentId, CommentCreateUpdateRequest comment)
154+
public async Task<dynamic> UpdateComment(long commentId, CommentCreateUpdateRequest comment)
155155
{
156156
string url = string.Format("/comment/{0}", commentId);
157157
return await _podio.Put<dynamic>(url, comment);

0 commit comments

Comments
 (0)