コード例 #1
0
ファイル: Program.cs プロジェクト: gospodnetic/FitBit
        static void Main(string[] args)
        {
            WebServer ws = new WebServer(SendResponse, "http://localhost:8080/test/");

            ws.Run();
            Console.WriteLine("A simple web server. Press a key to quit!");
            Console.ReadKey();
            ws.Stop();
        }
コード例 #2
0
ファイル: FitBit.cs プロジェクト: gospodnetic/FitBit
        static void Main(string[] args)
        {
            WebServer ws = new WebServer(SendResponse, "http://localhost:8080/test/");
            ws.Run();

            var clientIdentifier = "11df6ee71f2fa9e5799164c20c8bc099";
            var clientSecret = "57862a3d8bc915d728566216575697b3";
            var authorizationEndpointUrl = "https://www.fitbit.com/oauth2/authorize?client_id=229XX2";
            var tokenEndpoint = "https://api.fitbit.com/oauth2/token";

            Authenticator auth=new Authenticator(clientIdentifier, clientSecret, authorizationEndpointUrl, tokenEndpoint);
            
            auth.Authenticate2();

            Console.WriteLine("A simple web server. Press a key to quit!");
            Console.ReadKey();
            ws.Stop();
        }