JSON feed'lerini Sheets Data API'den almayla ilgili basit örnek
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Uyarı: Bu sayfa, Google'ın eski API'leri olan Google Veri API'leriyle ilgilidir. Bu sayfalar, çoğu yeni API'lerle değiştirilen Google Veri API'leri dizininde listelenen API'lerle ilgilidir. Belirli bir yeni API ile ilgili bilgi edinmek için yeni API'nin belgelerine bakabilirsiniz. Yeni bir API ile istekleri yetkilendirme hakkında bilgi için Google Hesaplarında Kimlik Doğrulama ve Yetkilendirme başlıklı makaleyi inceleyin.
Giriş
Bu örnekte, E-Tablolar Veri API'si tarafından sağlanan JSON çıkış biçimi kullanılarak belirli bir çalışma sayfası için liste veya hücre feed'i gösterilmektedir. Bu, bir e-tablonun herkese açık listesini veya hücre feed'ini sorgulamanızı ve sonuç olarak elde edilen girişlerin JSON nesneleri olarak döndürülmesini sağlar. Yeni JSON feed'ini kullanmak için src
değeri şu olan bir komut dosyası öğesi oluşturun:
http://spreadsheets.google.com/feeds/feed/key/worksheet/public/basic?alt=json-in-script&callback=myFunc
Burada feed
, feed türünü; key
ise almak istediğiniz e-tablonun anahtarıdır. worksheet
ise çalışma sayfasının konum veya benzersiz tanımlayıcısıdır. myFunc
ise geri çağırma işlevinizin ve JSON nesnesinin adıdır. Google Veri API'ları için JSON çıkış desteği hakkında daha fazla bilgi edinmek isterseniz lütfen JSON çıkış desteği dokümanlarımızı inceleyin.
Not: Bir feed'in kimlik doğrulaması yapılmadan alınması yalnızca yayınlanan e-tablolar için desteklenir.
Not: Diğer feed türleri ile görünürlük ve projeksiyon değerleri JSON çıkış desteği ile kullanılabilir. Diğer feed türleri ile görünürlük ve projeksiyon değerleri hakkında daha fazla bilgi edinmek için lütfen spreadsheets Data API belgelerine bakın.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2023-03-01 UTC.
[null,null,["Son güncelleme tarihi: 2023-03-01 UTC."],[],[],null,["# Simple example of retrieving JSON feeds from Spreadsheets Data API\n\n**Warning** : This page is about Google's older APIs, the Google Data APIs; it's relevant only to the APIs that are listed in the [Google Data APIs directory](/gdata/docs/directory), many of which have been replaced with newer APIs. For information about a specific new API, see the new API's documentation. For information about authorizing requests with a newer API, see [Google Accounts Authentication and Authorization](/accounts).\n| Version v4 of the [Google Sheets API](/sheets) is now available! This [migration guide](/sheets/guides/migration) shows how to update applications to use v4.\n\n### Introduction\n\nThis sample demonstrates displaying a list or cells feed for a particular worksheet in a spreadsheet using the JSON output format provided by the Spreadsheets Data API. This allows you to query a spreadsheet's public list or cell feed and get the resulting entries returned as JSON objects. To use the new JSON feed, create a script element whose `src` value is\n\u003e `http://spreadsheets.google.com/feeds/`**feed** `/`**key** `/`**worksheet** `/public/basic?alt=json-in-script&callback=`**myFunc**\n\nwhere **`feed`** is the type of feed, **`key`** is the key of the spreadsheet you want to retrieve, the **`worksheet`** is the positional or unique identifier of the worksheet, and **`myFunc`** is the name of your callback function that is passed the JSON object. For more information on JSON output support for Google Data APIs please see our [JSON output support documentation](/gdata/json).\n\n**Note:** Retrieving a feed without authentication is only supported for published spreadsheets.\n\n**Note:** Other feed types and visibility and projection values may be used with JSON output support. For more information on other feed types, and visibility and projection values please see the [Spreadsheets Data API](/google-apps/spreadsheets) documentation.\n\n### Demo\n\nSpreadsheet: http://spreadsheets.google.com/feeds/ list cells / / /public/values OK"]]