complete retrieveParameters;
This commit is contained in:
@@ -16,8 +16,7 @@ namespace PocketSharp.Console
|
||||
// this apiKey is just for demonstration purposes
|
||||
// please create your own application and retrieve it's key. It's a 1-step process ;-)
|
||||
PocketClient client = new PocketClient(
|
||||
consumerKey: "15396-f6f92101d72c8e270a6c9bb3",
|
||||
accessCode: "a85134a7-243c-6656-ab82-97c901"
|
||||
consumerKey: "15396-f6f92101d72c8e270a6c9bb3"
|
||||
);
|
||||
|
||||
System.Console.ReadKey();
|
||||
|
||||
@@ -24,6 +24,12 @@ namespace PocketSharp.Models
|
||||
|
||||
public string Domain { get; set; }
|
||||
|
||||
public DateTime Since { get; set; }
|
||||
|
||||
public int? Count { get; set; }
|
||||
|
||||
public int? Offset { get; set; }
|
||||
|
||||
|
||||
public List<Parameter> Convert()
|
||||
{
|
||||
@@ -42,9 +48,15 @@ namespace PocketSharp.Models
|
||||
if (DetailType != null)
|
||||
parameters.Add(CreateParam("detailType", DetailType.ToString()));
|
||||
if (Search != null)
|
||||
parameters.Add(CreateParam("search", Search.ToString()));
|
||||
parameters.Add(CreateParam("search", Search));
|
||||
if (Domain != null)
|
||||
parameters.Add(CreateParam("domain", Domain.ToString()));
|
||||
parameters.Add(CreateParam("domain", Domain));
|
||||
if (Since != null)
|
||||
parameters.Add(CreateParam("since", (int)(Since - new DateTime(1970, 1, 1)).TotalSeconds));
|
||||
if (Count != null)
|
||||
parameters.Add(CreateParam("count", Count));
|
||||
if (Offset != null)
|
||||
parameters.Add(CreateParam("offset", Offset));
|
||||
|
||||
return parameters;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using PocketSharp.Utilities;
|
||||
using PocketSharp.Models;
|
||||
|
||||
namespace PocketSharp
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user