コード例 #1
0
        /// <summary>
        /// Returns the raw data that is contingent to the Google Sheets API.
        /// </summary>
        public static async Task <SpreadsheetRaw> Get(string spreadsheetId, Authorization authorization, bool includeGridData, SheetsSerializer serializer = null)
        {
            if (serializer == null)
            {
                serializer = SheetsSerializer.Serializer;
            }
            if (serializer == null)
            {
                throw new Exception("No serializer was given.");
            }

            SheetsClient   client = new SheetsClient(spreadsheetId, authorization, serializer);
            SpreadsheetRaw raw    = await client.GetRaw(includeGridData);

            return(raw);
        }
コード例 #2
0
ファイル: Spreadsheet.cs プロジェクト: popcron/sheets
        /// <summary>
        /// Returns a high level representation of a spreadsheet.
        /// </summary>
        public static async Task <Spreadsheet> Get(string spreadsheetId, Authorization authorization, SheetsSerializer serializer = null)
        {
            if (serializer == null)
            {
                serializer = SheetsSerializer.Serializer;
            }
            if (serializer == null)
            {
                throw new Exception("No serializer was given.");
            }

            SheetsClient client      = new SheetsClient(spreadsheetId, authorization, serializer);
            Spreadsheet  spreadsheet = await client.Get();

            return(spreadsheet);
        }