Example #1
0
        protected override async Task <IEnumerable <object> > Main()
        {
            var widgets = new List <Widget>();

            // fill in the following from google console
            var auth = new
            {
                type           = "",
                project_id     = "",
                private_key_id = "",
                private_key    = "",
                client_email   = "",
                client_id      = "",
                auth_uri       = "https://accounts.google.com/o/oauth2/auth",
                token_uri      = "https://oauth2.googleapis.com/token",
                auth_provider_x509_cert_url = "https://www.googleapis.com/oauth2/v1/certs",
                client_x509_cert_url        = ""
            };


            var response = await gAService.ReadSheet <GSheet>(auth, "DashReport",
                                                              "1OQMUWSyo7zifekmv-sW3gZOSubkNZtXLqFIpP6agMto",
                                                              "A1:E");

            widgets.Add(new Widget("My Sheet")
            {
                Content = new TableContent()
                {
                    Content = response
                },
                Column = 12
            });

            return(widgets);
        }