====== OAuth 2.0 Playground ======
[[https://developers.google.com/oauthplayground/|OAuth 2.0 Playground]]
[[https://qiita.com/howdy39/items/ca719537bba676dce1cf|Googleスプレッドシートをプログラムから操作]]
[[https://developers.google.com/sheets/guides/batchupdate?hl=ja|スプレッドシートのアップデート]]
ここにシート名変更のサンプルがあった
===== SpreadSheetの操作 =====
{{:google:pasted:20190205-071040.png}}
===== 調べ方 =====
Http MethodをGETにする
Request URIに
https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}?includeGridData=trueを入力
した値を比較する
===== APIサンプル =====
==== ブック名の変更 ====
let url2 = "https://sheets.googleapis.com/v4/spreadsheets/" + this.state.spreadsheetId + ":batchUpdate"
let bodyString = '{"requests": [{"updateSpreadsheetProperties": {"properties": {"title": "ブック名"},"fields": "title"}}]}'
==== シート名の変更 ====
let url2 = "https://sheets.googleapis.com/v4/spreadsheets/" + this.state.spreadsheetId + ":batchUpdate"
let bodyString = `{
"requests": [
{
"updateSheetProperties": {
"properties": {"sheetId": 0, "title": "問題"},
"fields": "title"
}
},
]
}`