Skip to content

Commit

Permalink
feat: fetch pagination informations
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidRouyer committed Jan 8, 2019
1 parent 6f593cc commit ec9fdef
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/Pipedrive.net/Models/Response/AdditionalData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Newtonsoft.Json;

namespace Pipedrive.Internal
{
internal class AdditionalData
{
[JsonProperty("pagination")]
public PaginationInfo Pagination { get; set; }
}
}
10 changes: 9 additions & 1 deletion src/Pipedrive.net/Models/Response/JsonResponse.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
namespace Pipedrive.Internal
using Newtonsoft.Json;

namespace Pipedrive.Internal
{
internal class JsonResponse<T>
{
public bool Success { get; set; }

public T Data { get; set; }

[JsonProperty("additional_data")]
public AdditionalData AdditionalData { get; set; }

[JsonProperty("related_objects")]
public object RelatedObjects { get; set; }
}
}
19 changes: 19 additions & 0 deletions src/Pipedrive.net/Models/Response/PaginationInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Newtonsoft.Json;

namespace Pipedrive.Internal
{
internal class PaginationInfo
{
[JsonProperty("start")]
public long Start { get; set; }

[JsonProperty("limit")]
public long Limit { get; set; }

[JsonProperty("more_items_in_collection")]
public bool MoreItemsInCollection { get; set; }

[JsonProperty("next_start")]
public long? NextStart { get; set; }
}
}

0 comments on commit ec9fdef

Please sign in to comment.