2013-06-13 13:34:41 +02:00
|
|
|
using System;
|
2013-06-13 16:06:28 +02:00
|
|
|
using PocketSharp;
|
2013-06-13 16:22:38 +02:00
|
|
|
using PocketSharp.Models.Authentification;
|
2013-06-20 00:24:43 +02:00
|
|
|
using PocketSharp.Models;
|
|
|
|
|
using System.Collections.Generic;
|
2013-06-13 13:34:41 +02:00
|
|
|
|
|
|
|
|
namespace PocketSharp.Console
|
|
|
|
|
{
|
|
|
|
|
class Program
|
|
|
|
|
{
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
System.Console.WriteLine("PocketClient internal usage tests");
|
|
|
|
|
System.Console.WriteLine("---------------------------------");
|
|
|
|
|
|
2013-06-20 15:10:48 +02:00
|
|
|
// this consumerKey is just for demonstration purposes
|
2013-06-13 13:34:41 +02:00
|
|
|
// please create your own application and retrieve it's key. It's a 1-step process ;-)
|
2013-06-19 23:05:12 +02:00
|
|
|
PocketClient client = new PocketClient(
|
2013-06-21 00:07:05 +02:00
|
|
|
consumerKey: "15396-f6f92101d72c8e270a6c9bb3"
|
2013-06-19 23:05:12 +02:00
|
|
|
);
|
2013-06-14 02:44:40 +02:00
|
|
|
|
2013-06-24 19:55:16 +02:00
|
|
|
//Uri redirect = client.Authenticate(new Uri("http://example.com"));
|
2013-06-20 15:10:48 +02:00
|
|
|
|
2013-06-24 19:55:16 +02:00
|
|
|
//System.Console.WriteLine(redirect.ToString());
|
2013-06-21 11:20:50 +02:00
|
|
|
|
2013-06-24 19:55:16 +02:00
|
|
|
//System.Console.WriteLine("---------------------------------");
|
|
|
|
|
//System.Console.WriteLine("Press Any key after you've authenticated the user via the given URI");
|
2013-06-21 11:20:50 +02:00
|
|
|
|
2013-06-24 19:55:16 +02:00
|
|
|
//System.Console.ReadKey();
|
2013-06-21 11:20:50 +02:00
|
|
|
|
2013-06-24 19:55:16 +02:00
|
|
|
//System.Console.WriteLine("---------------------------------");
|
|
|
|
|
|
|
|
|
|
//System.Console.WriteLine(client.GetAccessCode());
|
|
|
|
|
|
|
|
|
|
client.Search("css").ForEach(delegate(PocketItem item)
|
|
|
|
|
{
|
|
|
|
|
System.Console.WriteLine(item.ID + " ::: " + item.FullTitle);
|
|
|
|
|
});
|
|
|
|
|
|
2013-06-21 11:20:50 +02:00
|
|
|
System.Console.WriteLine("---------------------------------");
|
|
|
|
|
|
2013-06-24 19:55:16 +02:00
|
|
|
client.Archive(330361896);
|
|
|
|
|
|
2013-06-21 00:07:05 +02:00
|
|
|
|
2013-06-13 13:34:41 +02:00
|
|
|
System.Console.ReadKey();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|