इवेंट को किसी दूसरे कैलेंडर पर ले जाता है. इसका मतलब है कि इवेंट के आयोजक को बदलना. ध्यान दें कि सिर्फ़ default
इवेंट को एक से दूसरी जगह ले जाया जा सकता है. birthday
, focusTime
, fromGmail
, outOfOffice
, और workingLocation
इवेंट को एक से दूसरी जगह नहीं ले जाया जा सकता.
इसे अभी आज़माएं या उदाहरण देखें.
अनुरोध
एचटीटीपी अनुरोध
POST https://www.googleapis.com/calendar/v3/calendars/calendarId /events/eventId /move
पैरामीटर
पैरामीटर का नाम | मान | ब्यौरा |
---|---|---|
पाथ पैरामीटर | ||
calendarId |
string |
उस सोर्स कैलेंडर का कैलेंडर आइडेंटिफ़ायर जहां इवेंट फ़िलहाल मौजूद है. |
eventId |
string |
इवेंट आइडेंटिफ़ायर. |
ज़रूरी क्वेरी पैरामीटर | ||
destination |
string |
टारगेट कैलेंडर का कैलेंडर आइडेंटिफ़ायर, जहां इवेंट को ले जाना है. |
ज़रूरी नहीं क्वेरी पैरामीटर | ||
sendNotifications |
boolean |
समर्थन नहीं होना या रुकना. इसके बजाय, कृपया sendUpdates का इस्तेमाल करें. इवेंट के आयोजक में हुए बदलाव के बारे में सूचनाएं भेजनी हैं या नहीं. ध्यान दें कि वैल्यू को false पर सेट करने के बाद भी, कुछ ईमेल भेजे जा सकते हैं. डिफ़ॉल्ट रूप से, यह false पर सेट होता है.
|
sendUpdates |
string |
उन मेहमानों को सूचनाएं भेजी जानी चाहिए जिन्हें इवेंट के आयोजक में हुए बदलाव के बारे में सूचनाएं मिलनी चाहिए.
इन वैल्यू का इस्तेमाल किया जा सकता है:
|
अनुमति देना
इस अनुरोध के लिए, इनमें से कम से कम एक स्कोप के साथ अनुमति देना ज़रूरी है:
दायरा |
---|
https://www.googleapis.com/auth/calendar |
https://www.googleapis.com/auth/calendar.events |
https://www.googleapis.com/auth/calendar.events.owned |
ज़्यादा जानकारी के लिए, पुष्टि और अनुमति पेज देखें.
अनुरोध का मुख्य भाग
इस तरीके का इस्तेमाल करते समय, अनुरोध का मुख्य हिस्सा न दें.
जवाब
अगर यह तरीका कामयाब होता है, तो यह जवाब के मुख्य हिस्से में इवेंट रिसॉर्स दिखाता है.
उदाहरण
ध्यान दें: इस तरीके के लिए दिए गए कोड के उदाहरणों में इसके साथ काम करने वाली सभी प्रोग्रामिंग भाषाएं नहीं दिखाई गई हैं (इसके साथ काम करने वाली भाषाओं की सूची के लिए क्लाइंट लाइब्रेरी वाला पेज देखें).
Java क्लाइंट लाइब्रेरी का इस्तेमाल करता है.
import com.google.api.services.calendar.Calendar; import com.google.api.services.calendar.model.Event; // ... // Initialize Calendar service with valid OAuth credentials Calendar service = new Calendar.Builder(httpTransport, jsonFactory, credentials) .setApplicationName("applicationName").build(); // Move an event to another calendar Event updatedEvent = service.events().move('primary', "eventId", "destinationCalendarId").execute(); System.out.println(updatedEvent.getUpdated());
Python क्लाइंट लाइब्रेरी का इस्तेमाल करता है.
# First retrieve the event from the API. updated_event = service.events().move( calendarId='primary', eventId='eventId', destination='destinationCalendarId').execute() # Print the updated date. print updated_event['updated']
PHP क्लाइंट लाइब्रेरी का इस्तेमाल करता है.
$result = $service->events->move('primary', 'eventId', 'destinationCalendarId'); // Print the updated date. echo $result->getUpdated();
Ruby क्लाइंट लाइब्रेरी का इस्तेमाल करता है.
result = client.move_event('primary', 'eventId', 'destinationCalendarId') print result.updated