Gelişmiş Takvim hizmeti, Google Dokümanlar'da herkese açık Apps Komut Dosyası'ndaki Google Takvim API'si. Bu API, Apps Komut Dosyası'nın yerleşik Takvim hizmetine benzer şekilde komut dosyalarının kullanıcının Google Takvim'ine erişmesine ve bunları değiştirmesine izin verir. Örneğin: Kullanıcının abone olduğu ek takvimler. Çoğu durumda yerleşik kullanmak daha kolaydır, ancak bu gelişmiş hizmet, her bir etkinlik için arka plan rengini belirleme gibi özelliklerden yararlanabilirsiniz.
Referans
Bu hizmetle ilgili ayrıntılı bilgi için bkz. referans belgeleri Google Takvim API'sı. Apps Komut Dosyası'ndaki tüm gelişmiş hizmetlerde olduğu gibi, Takvim hizmeti, herkese açık verilerle aynı nesneleri, yöntemleri ve parametreleri kullanır API'ye gidin. Daha fazla bilgi için Yöntem imzaları nasıl belirlenir? bölümüne bakın.
Sorunları bildirmek ve başka destek almak için şu sayfaya bakın: Takvim destek kılavuzu.
HTTP istek başlıkları
Gelişmiş Takvim hizmeti, HTTP istek başlıklarını kabul edebilir
If-Match
ve If-None-Match
. Ayrıntılar için referans dokümanlarını inceleyin.
Örnek kod
Aşağıdaki örnek kod şunun sürüm 3'ü kullanır: API.
Etkinlik oluşturma
Aşağıdaki örnekte, kullanıcının varsayılan ayarında nasıl etkinlik oluşturulacağı gösterilmektedir takvim.
Takvimleri listeleme
Aşağıdaki örnekte, kullanıcının takvim listesinde gösterilen takvimlerle ilgili ayrıntıların nasıl alınacağı gösterilmektedir.
Etkinlikleri listeleme
Aşağıdaki örnekte, kullanıcının varsayılan takviminde yaklaşan 10 etkinliğin nasıl listeleneceği gösterilmektedir.
Bir etkinliği koşullu olarak değiştirme
Aşağıdaki örnekte,
If-Match
üstbilgisi. Komut dosyası yeni bir etkinlik oluşturur, 30 saniye bekler, ardından
etkinliği, yalnızca etkinlik gerçekleştirildikten sonra hiçbir etkinlik ayrıntısı değişmediyse günceller
oluşturuldu.
Bir etkinliği koşullu olarak alma
Aşağıdaki örnekte,
If-None-Match
üstbilgisi. Komut dosyası yeni bir etkinlik oluşturur, ardından
etkinliğini 30 saniye boyunca kontrol edin. Etkinlik her değiştiğinde yeni sürüm
getirildiğinden emin olun.
Etkinlikleri senkronize etme
Aşağıdaki örnekte, senkronizasyon jetonları kullanılarak etkinliklerin nasıl alınacağı gösterilmektedir. Bir Takvim gelişmiş hizmet isteğine senkronizasyon jetonu eklediğinizde, elde edilen yanıt yalnızca jeton oluşturulduktan sonra değişen öğeleri içerir. Bu sayede daha verimli bir işlem gerçekleştirilir. Senkronizasyon süreciyle ilgili daha fazla bilgi için Kaynakları Verimli Bir Şekilde Senkronize Etme başlıklı makaleyi inceleyin.
Aşağıdaki örnekte, aynı getRelativeDate(daysOffset, hour)
yöntemini çağırın.