Skip to content

updated avatar id, refid, fileid to long, added someother helpers as … #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/Podio .NET/Models/ByLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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; }
}
}
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/Contact.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class Contact
/// The file id of the avatar
/// </summary>
[JsonProperty("avatar", NullValueHandling = NullValueHandling.Ignore)]
public int Avatar { get; set; }
public long Avatar { get; set; }

public DateTime? BirthDate
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/ConversationMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/FileAttachment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/Grant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
4 changes: 2 additions & 2 deletions Source/Podio .NET/Models/Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -114,7 +114,7 @@ public class Item
public Grant Grant { get; set; }

[JsonProperty("file_ids")]
public List<int> FileIds { get; set; }
public List<long> FileIds { get; set; }

[JsonProperty("tasks")]
public List<Task> Tasks { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/ItemMicro.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/Organization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/Presence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/Reference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/Request/BulkDeleteRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class BulkDeleteRequest
/// An explicit list of item ids to be deleted
/// </summary>
[JsonProperty(PropertyName = "item_ids", NullValueHandling = NullValueHandling.Ignore)]
public List<int> ItemIds { get; set; }
public List<long> ItemIds { get; set; }

/// <summary>
/// The id of the saved view whose items are to be deleted. Ignored if "item_ids" is given.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class CommentCreateUpdateRequest
/// Temporary files that have been uploaded and should be attached to this comment.
/// </summary>
[JsonProperty(PropertyName = "file_ids", NullValueHandling = NullValueHandling.Ignore)]
public List<int> FileIds { get; set; }
public List<long> FileIds { get; set; }

/// <summary>
/// The id of an embedded link that has been created with the Add an embed operation in the Embed area.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ConversationCreateRequest
public string Text { get; set; }

[JsonProperty("file_ids", NullValueHandling = NullValueHandling.Ignore)]
public List<int> FileIds { get; set; }
public List<long> FileIds { get; set; }

[JsonProperty("participants", NullValueHandling = NullValueHandling.Ignore)]
public List<int> Participants { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ItemCreateUpdateRequest
public List<string> Tags { get; set; }

[JsonProperty(PropertyName = "file_ids", NullValueHandling = NullValueHandling.Ignore)]
public List<int> FileIds { get; set; }
public List<long> FileIds { get; set; }

[JsonProperty(PropertyName = "reminder", NullValueHandling = NullValueHandling.Ignore)]
public Reminder Reminder { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public DateTime? DueDate
/// The list of files to attach to this task
/// </summary>
[JsonProperty("file_ids", NullValueHandling = NullValueHandling.Ignore)]
public IEnumerable<int> FileIds { get; set; }
public IEnumerable<long> FileIds { get; set; }

/// <summary>
/// The list of labels in text form
Expand Down
6 changes: 3 additions & 3 deletions Source/Podio .NET/Models/SearchResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -43,5 +43,5 @@ public class SearchResult
public JToken Highlight { get; set; }
}


}
2 changes: 1 addition & 1 deletion Source/Podio .NET/Models/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
10 changes: 5 additions & 5 deletions Source/Podio .NET/Services/AppMarketService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public async Task<AppMarketShare> GetShare(int shareId)
/// <param name="refType"></param>
/// <param name="refId"></param>
/// <returns></returns>
public async Task<List<AppMarketShare>> GetShareByReference(string refType, int refId)
public async Task<List<AppMarketShare>> GetShareByReference(string refType, long refId)
{
string url = string.Format("/app_store/{0}/{1}/", refType, refId);
return await _podio.Get<List<AppMarketShare>>(url);
Expand Down Expand Up @@ -217,7 +217,7 @@ public async Task<AppMarketShareInstall> InstallShare(int shareId, int spaceId,
/// <param name="scope">The scope the app should be shared with, either "public" or "private", defaults to "public"</param>
/// <returns>The id of the newly created share</returns>
public async Task<int> ShareApp(string refType, int refId, string name, string abstracts, string description,
string language, int[] categoryId, int[] fileId, int videoId, List<string> features, int childrenId,
string language, int[] categoryId, long[] fileId, int videoId, List<string> features, int childrenId,
string scope = "public")
{
string url = "/app_store/";
Expand All @@ -237,7 +237,7 @@ public async Task<int> ShareApp(string refType, int refId, string name, string a
scope = scope
};
dynamic response = await _podio.Post<dynamic>(url, requestData);
return (int) response["share_id"];
return (int)response["share_id"];
}

/// <summary>
Expand All @@ -264,7 +264,7 @@ public async Task<dynamic> UnshareApp(int shareId)
/// <param name="fileId">The file ids to use as screenshots for the share</param>
/// <param name="videoId">The youtube id of a introduction video, if any</param>
public async Task<dynamic> 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
Expand All @@ -277,7 +277,7 @@ public async Task<dynamic> UpdateShare(int shareId, string name, string abstract
file_ids = fileId,
video = videoId
};
return await _podio.Put<dynamic>(url, requestData);
return await _podio.Put<dynamic>(url, requestData);
}
}
}
12 changes: 6 additions & 6 deletions Source/Podio .NET/Services/ApplicationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public async System.Threading.Tasks.Task DeactivateApp(int appId)
/// <param name="includeInactive"> True if inactive apps should be included, false otherwise.Default value: false </param>
/// <param name="additionalAttributes">Additional attributes to include in query string</param>
/// <returns></returns>
public async Task<List<Application>> GetAppsBySpace (int spaceId, bool includeInactive = false, Dictionary<string, string> additionalAttributes = null)
public async Task<List<Application>> GetAppsBySpace(int spaceId, bool includeInactive = false, Dictionary<string, string> additionalAttributes = null)
{
var requestData = new Dictionary<string, string>()
{
Expand Down Expand Up @@ -216,7 +216,7 @@ public async Task<ApplicationRevision> DeleteAppField(int appId, int fieldId, bo
{
{"delete_values", deleteValues.ToString()}
};

return await _podio.Delete<ApplicationRevision>(url, requestData);
}

Expand Down Expand Up @@ -355,15 +355,15 @@ public async System.Threading.Tasks.Task UpdateAppUsageInstructions(int appId, s
/// <returns></returns>
public async Task<int> 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
{
space_id = spaceId,
features = features
};
dynamic response = await _podio.Post<dynamic>(url, requestData);
return (int) response["app_id"];
return (int)response["app_id"];
}

/// <summary>
Expand Down Expand Up @@ -423,7 +423,7 @@ public async Task<int> AddNewApp(Application application)
Fields = application.Fields
};
dynamic response = await _podio.Post<dynamic>(url, requestDate);
return (int) response["app_id"];
return (int)response["app_id"];
}

/// <summary>
Expand All @@ -448,7 +448,7 @@ public async Task<int> AddNewAppField(int appId, ApplicationField field)
*/
string url = string.Format("/app/{0}/field/", appId);
dynamic response = await _podio.Post<dynamic>(url, field);
return (int) response["field_id"];
return (int)response["field_id"];
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Source/Podio .NET/Services/BatchService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public async Task<List<Batch>> GetBatches()
/// <param name="refId"></param>
/// <param name="plugin">The plugin can either be "app_import", "app_export", "space_contact_import" or "app_content".</param>
/// <returns></returns>
public async Task<List<Batch>> GetRunningBatches(string refType, int refId, string plugin)
public async Task<List<Batch>> GetRunningBatches(string refType, long refId, string plugin)
{
string url = string.Format("/batch/{0}/{1}/{2}/running/", refType, refId, plugin);
return await _podio.Get<List<Batch>>(url);
Expand Down
14 changes: 7 additions & 7 deletions Source/Podio .NET/Services/CommentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public CommentService(Podio currentInstance)
public async Task<dynamic> DeleteComment(int commentId)
{
string url = string.Format("/comment/{0}", commentId);
return await _podio.Delete<dynamic>(url);
return await _podio.Delete<dynamic>(url);
}

/// <summary>
Expand Down Expand Up @@ -76,8 +76,8 @@ public async Task<List<Comment>> GetCommentsOnObject(string type, int id)
/// </param>
/// <param name="hook">todo: describe hook parameter on AddCommentToObject</param>
/// <returns></returns>
public async Task<int> AddCommentToObject(string type, int id, string text, string externalId = null,
List<int> fileIds = null, string embedUrl = null, int? embedId = null, bool alertInvite = false,
public async Task<int> AddCommentToObject(string type, long id, string text, string externalId = null,
List<long> fileIds = null, string embedUrl = null, int? embedId = null, bool alertInvite = false,
bool silent = false, bool hook = true)
{
CommentCreateUpdateRequest comment = new CommentCreateUpdateRequest()
Expand Down Expand Up @@ -108,7 +108,7 @@ public async Task<int> AddCommentToObject(string type, int id, string text, stri
/// </param>
/// <param name="hook">todo: describe hook parameter on AddCommentToObject</param>
/// <returns></returns>
public async Task<int> AddCommentToObject(string type, int id, CommentCreateUpdateRequest comment, bool alertInvite = false,
public async Task<int> 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);
Expand All @@ -131,7 +131,7 @@ public async Task<int> 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
/// </param>
public async Task<dynamic> UpdateComment(int commentId, string text, string externalId = null, List<int> fileIds = null,
public async Task<dynamic> UpdateComment(int commentId, string text, string externalId = null, List<long> fileIds = null,
string embedUrl = null, int? embedId = null)
{
var requestData = new CommentCreateUpdateRequest()
Expand All @@ -142,7 +142,7 @@ public async Task<dynamic> UpdateComment(int commentId, string text, string ext
EmbedUrl = embedUrl,
EmbedId = embedId
};
return await UpdateComment(commentId, requestData);
return await UpdateComment(commentId, requestData);
}

/// <summary>
Expand All @@ -154,7 +154,7 @@ public async Task<dynamic> UpdateComment(int commentId, string text, string ext
public async Task<dynamic> UpdateComment(int commentId, CommentCreateUpdateRequest comment)
{
string url = string.Format("/comment/{0}", commentId);
return await _podio.Put<dynamic>(url, comment);
return await _podio.Put<dynamic>(url, comment);
}
}
}
6 changes: 3 additions & 3 deletions Source/Podio .NET/Services/ConversationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async Task<Conversation> CreateConversation(ConversationCreateRequest con
/// <param name="refId"></param>
/// <param name="conversationCreateRequest"></param>
/// <returns></returns>
public async Task<Conversation> CreateConversationOnObject(string refType, int refId,
public async Task<Conversation> CreateConversationOnObject(string refType, long refId,
ConversationCreateRequest conversationCreateRequest)
{
string url = string.Format("/conversation/{0}/{1}/", refType, refId);
Expand Down Expand Up @@ -127,7 +127,7 @@ public async Task<List<Conversation>> GetConversations(int limit = 10, int offse
/// <param name="refType"></param>
/// <param name="refId"></param>
/// <returns></returns>
public async Task<List<Conversation>> GetConversationsOnObject(string refType, int refId)
public async Task<List<Conversation>> GetConversationsOnObject(string refType, long refId)
{
string url = string.Format("/conversation/{0}/{1}/", refType, refId);
return await _podio.Get<List<Conversation>>(url);
Expand Down Expand Up @@ -233,7 +233,7 @@ public async Task<dynamic> MarkConversationAsUnread(int converstionId)
/// </param>
/// <param name="embedUrl">The url to be attached</param>
/// <returns></returns>
public async Task<ConversationEvent> ReplyToConversation(int converstionId, string text, List<int> fileIds = null,
public async Task<ConversationEvent> ReplyToConversation(int converstionId, string text, List<long> fileIds = null,
int? embedId = null, string embedUrl = null)
{
string url = string.Format("/conversation/{0}/reply/v2", converstionId);
Expand Down
Loading