Commit 869cfafb authored by Colin Kiama's avatar Colin Kiama

Added Query Parameter Enums for Posts

parent ed5d912a
using System;
using System.Collections.Generic;
using System.Text;
namespace ProductHuntAPI.Enums
{
public enum PostsQueryParameterName
{
PostedAfter,
PostedBefore,
Topic,
TwitterUrl
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace ProductHuntAPI.Enums
{
public enum QueryParameterName
{
After,
Before,
First,
Last,
Order
}
}
......@@ -4,7 +4,7 @@ using System.Text;
namespace ProductHuntAPI.Interfaces
{
interface IVotable
public interface IVotable
{
string Id { get; set; }
bool IsVoted { get; set; }
......
......@@ -9,23 +9,48 @@ namespace ProductHuntAPI.Model
{
[JsonProperty("commentsCount")]
public int CommentsCount { get; set; }
[JsonProperty("createdAt")]
public DateTime CreatedAt { get; set; }
[JsonProperty("description")]
public string Desription { get; set; }
[JsonProperty("featuredAt")]
public DateTime FeaturedAt { get; set; }
[JsonProperty("id")]
public string Id { get; set; }
[JsonProperty("isCollected")]
public bool IsCollected { get; set; }
[JsonProperty("isVoted")]
public bool IsVoted { get; set; }
//public List<User> Makers { get; set; }
[JsonProperty("reviewsRating")]
public float ReviewsRating { get; set; }
[JsonProperty("slug")]
public string Slug { get; set; }
[JsonProperty("tagline")]
public string Tagline { get; set; }
//[JsonProperty("thumbnail")]
//public Media Thumbnail { get; set; }
[JsonProperty("url")]
public string PostUrl { get; set; }
[JsonProperty("userId")]
public string UserId { get; set; }
[JsonProperty("votesCount")]
public int VotesCount { get; set; }
[JsonProperty("website")]
public string Website { get; set; }
}
}
using ProductHuntAPI.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
namespace ProductHuntAPI.Model
{
public class Query<T>
{
public Query<T> AddParameter<T>(Query<T> formerQuery) where T : IVotable
{
throw new NotImplementedException();
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace ProductHuntAPI.Model
{
class QueryResult
{
}
}
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