Loading...
Loading...
Compare original and translation side by side
gsheett-younami@woven-fountain-458301-p7.iam.gserviceaccount.comgsheett-younami@woven-fountain-458301-p7.iam.gserviceaccount.com| name | age | |
|---|---|---|
| John | 25 | john@example.com |
| Jane | 30 | jane@example.com |
| name | age | |
|---|---|---|
| John | 25 | john@example.com |
| Jane | 30 | jane@example.com |
https://gsheet.codingfor.fun/api/{doc_id}/{sheet_name}doc_idhttps://docs.google.com/spreadsheets/d/{doc_id}/editsheet_nameSheet1https://gsheet.codingfor.fun/api/{doc_id}/{sheet_name}doc_idhttps://docs.google.com/spreadsheets/d/{doc_id}/editsheet_nameSheet1curl 'https://gsheet.codingfor.fun/api/{doc_id}'curl 'https://gsheet.codingfor.fun/api/{doc_id}?name=John&age=25'[
{"name": "John", "age": 25, "email": "john@example.com"}
]curl 'https://gsheet.codingfor.fun/api/{doc_id}'curl 'https://gsheet.codingfor.fun/api/{doc_id}?name=John&age=25'[
{"name": "John", "age": 25, "email": "john@example.com"}
]curl -X POST 'https://gsheet.codingfor.fun/api/{doc_id}' \
-H 'Content-Type: application/json' \
-d '{"name": "Mike", "age": 28, "email": "mike@example.com"}'curl -X POST 'https://gsheet.codingfor.fun/api/{doc_id}' \
-H 'Content-Type: application/json' \
-d '[
{"name": "Mike", "age": 28, "email": "mike@example.com"},
{"name": "Sarah", "age": 35, "email": "sarah@example.com"}
]'curl -X POST 'https://gsheet.codingfor.fun/api/{doc_id}' \
-H 'Content-Type: application/json' \
-d '{"name": "Mike", "age": 28, "email": "mike@example.com"}'curl -X POST 'https://gsheet.codingfor.fun/api/{doc_id}' \
-H 'Content-Type: application/json' \
-d '[
{"name": "Mike", "age": 28, "email": "mike@example.com"},
{"name": "Sarah", "age": 35, "email": "sarah@example.com"}
]'curl -X PUT 'https://gsheet.codingfor.fun/api/{doc_id}?name=John' \
-H 'Content-Type: application/json' \
-d '{"age": 26, "email": "new_email@example.com"}'curl -X PUT 'https://gsheet.codingfor.fun/api/{doc_id}?name=John' \
-H 'Content-Type: application/json' \
-d '{"age": 26, "email": "new_email@example.com"}'curl -X DELETE 'https://gsheet.codingfor.fun/api/{doc_id}?name=John'curl -X DELETE 'https://gsheet.codingfor.fun/api/{doc_id}?name=John'const API_BASE = 'https://gsheet.codingfor.fun/api';
const DOC_ID = 'your_doc_id';
// 查询
const data = await fetch(`${API_BASE}/${DOC_ID}?name=John`).then(r => r.json());
// 插入
await fetch(`${API_BASE}/${DOC_ID}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ name: 'Mike', age: 28, email: 'mike@example.com' })
});
// 更新
await fetch(`${API_BASE}/${DOC_ID}?name=John`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ age: 26 })
});
// 删除
await fetch(`${API_BASE}/${DOC_ID}?name=John`, { method: 'DELETE' });const API_BASE = 'https://gsheet.codingfor.fun/api';
const DOC_ID = 'your_doc_id';
// 查询
const data = await fetch(`${API_BASE}/${DOC_ID}?name=John`).then(r => r.json());
// 插入
await fetch(`${API_BASE}/${DOC_ID}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ name: 'Mike', age: 28, email: 'mike@example.com' })
});
// 更新
await fetch(`${API_BASE}/${DOC_ID}?name=John`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ age: 26 })
});
// 删除
await fetch(`${API_BASE}/${DOC_ID}?name=John`, { method: 'DELETE' });import requests
API_BASE = 'https://gsheet.codingfor.fun/api'
DOC_ID = 'your_doc_id'import requests
API_BASE = 'https://gsheet.codingfor.fun/api'
DOC_ID = 'your_doc_id'undefinedundefined