แสดงการตั้งค่าของผู้ใช้รายเดียว ลองเลยหรือดูตัวอย่าง
ส่งคำขอ
คำขอ HTTP
GET https://www.googleapis.com/calendar/v3/users/me/settings/setting
พารามิเตอร์
ชื่อพารามิเตอร์ | ค่า | คำอธิบาย |
---|---|---|
พารามิเตอร์เส้นทาง | ||
setting |
string |
รหัสของการตั้งค่าผู้ใช้ |
การให้สิทธิ์
คำขอนี้ต้องได้รับการให้สิทธิ์ที่มีขอบเขตต่อไปนี้อย่างน้อย 1 ขอบเขต
ขอบเขต |
---|
https://www.googleapis.com/auth/calendar.readonly |
https://www.googleapis.com/auth/calendar |
https://www.googleapis.com/auth/calendar.settings.readonly |
สำหรับข้อมูลเพิ่มเติม โปรดดูที่หน้าการตรวจสอบสิทธิ์และการให้สิทธิ์
เนื้อหาของคำขอ
โปรดอย่าให้เนื้อหาคำขอตามวิธีการนี้
คำตอบ
หากทำสำเร็จ เมธอดนี้จะแสดงทรัพยากรการตั้งค่าในเนื้อหาการตอบกลับ
ตัวอย่าง
หมายเหตุ: ตัวอย่างโค้ดที่มีสำหรับวิธีการนี้ไม่ได้แสดงถึงภาษาโปรแกรมที่รองรับทั้งหมด (ดูรายการภาษาที่รองรับได้ในหน้าไลบรารีของไคลเอ็นต์)
import com.google.api.services.calendar.Calendar;
import com.google.api.services.calendar.model.Setting;
// ...
// Initialize Calendar service with valid OAuth credentials
Calendar service = new Calendar.Builder(httpTransport, jsonFactory, credentials)
.setApplicationName("applicationName").build();
// Retrieve a single user setting
Setting setting = service.settings().get("settingId").execute();
System.out.println(setting.getId() + ": " + setting.getValue());
setting = service.settings().get(setting='settingId').execute()
print '%s: %s' % (setting['id'], setting['value'])
$settings = $service->settings->get('settingId');
echo $setting->getId() . ': ' . $setting->getValue();
result = client.get_setting('settingId')
print result.id + ": " + result.value