Commit a6dd5454 authored by Colin Kiama's avatar Colin Kiama

Created "Edge" and "PageInfo" classes

parent 869cfafb
using Newtonsoft.Json;
namespace ProductHuntAPI.Model
{
public class Edge<T>
{
[JsonProperty("cursor")]
public string Cursor { get; set; }
[JsonProperty("node")]
public T Node { get; set; }
}
}
\ No newline at end of file
using Newtonsoft.Json;
namespace ProductHuntAPI.Model
{
public class PageInfo
{
[JsonProperty("endCursor")]
public string EndCursor { get; set; }
[JsonProperty("hasNextPage")]
public bool HasNextPage { get; set; }
[JsonProperty("hasPreviousPage")]
public bool HasPreviousPage { get; set; }
[JsonProperty("startCursor")]
public string StartCursor { get; set; }
}
}
\ No newline at end of file
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace ProductHuntAPI.Model
{
class QueryResult
public class QueryResult<T>
{
[JsonProperty("edges")]
public Edge<T> Edges { get; set; }
[JsonProperty("pageInfo")]
public PageInfo ResultPageInfo { get; set; }
[JsonProperty("totalCount")]
public int TotalCount { get; set; }
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment