Esempio n. 1
0
        public static void Main(string[] args)
        {
            System.Net.ServicePointManager.CertificatePolicy = new TrustAllCertificatesPolicy();

            if (args.Length < 5)
            {
                Console.WriteLine("Usage: Example.exe api_url consumer_key " +
                                  "consumer_secret authorized_token " +
                                  "authorized_token_secret");
                return;
            }

            string apiUrl                = args[0];
            string consumerKey           = args[1];
            string consumerSecret        = args[2];
            string authorizedToken       = args[3];
            string authorizedTokenSecret = args[4];

            Credential credential = new OAuthCredential(
                consumerKey, consumerSecret,
                authorizedToken, authorizedTokenSecret);

            TripIt t = new TripIt(credential, apiUrl);

            Console.WriteLine(t.ListTrip().Trip.Length);
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            System.Net.ServicePointManager.CertificatePolicy = new TrustAllCertificatesPolicy();

            if (args.Length < 5) {
                Console.WriteLine("Usage: Example.exe api_url consumer_key " +
                    "consumer_secret authorized_token " +
                    "authorized_token_secret");
                return;
            }

            string apiUrl = args[0];
            string consumerKey = args[1];
            string consumerSecret = args[2];
            string authorizedToken = args[3];
            string authorizedTokenSecret = args[4];

            Credential credential = new OAuthCredential(
                consumerKey, consumerSecret,
                authorizedToken, authorizedTokenSecret);

            TripIt t = new TripIt(credential, apiUrl);

            Console.WriteLine(t.ListTrip().Trip.Length);
        }