Files
PocketSharp/PocketSharp.Console/Program.cs
T

39 lines
1.1 KiB
C#
Raw Normal View History

using System;
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;
namespace PocketSharp.Console
{
class Program
{
static void Main(string[] args)
{
System.Console.WriteLine("PocketClient internal usage tests");
System.Console.WriteLine("---------------------------------");
// this consumerKey is just for demonstration purposes
// 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-21 11:20:50 +02:00
Uri redirect = client.Authenticate(new Uri("http://example.com"));
2013-06-21 11:20:50 +02:00
System.Console.WriteLine(redirect.ToString());
System.Console.WriteLine("---------------------------------");
System.Console.WriteLine("Press Any key after you've authenticated the user via the given URI");
System.Console.ReadKey();
System.Console.WriteLine("---------------------------------");
System.Console.WriteLine(client.GetAccessCode());
2013-06-21 00:07:05 +02:00
System.Console.ReadKey();
}
}
}