स्प्रेडशीट डेटा एपीआई से JSON फ़ीड वापस पाने का आसान उदाहरण
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
चेतावनी: यह पेज, Google के पुराने एपीआई यानी कि Google Data API के बारे में है. यह सिर्फ़ उन एपीआई के बारे में है जो Google Data API डायरेक्ट्री में मौजूद हैं. इनमें से कई एपीआई को नए एपीआई से बदला गया है. किसी नए एपीआई के बारे में जानकारी पाने के लिए, उस नए एपीआई के दस्तावेज़ देखें. नए एपीआई से अनुरोधों को अनुमति देने के बारे में जानकारी पाने के लिए, Google खाते की पुष्टि करना और अनुमति देना देखें.
सुविधा के बारे में जानकारी
यह नमूना स्प्रेडशीट में किसी खास वर्कशीट के लिए सूची या सेल फ़ीड दिखाने के लिए स्प्रेडशीट डेटा एपीआई से मिले JSON आउटपुट फ़ॉर्मैट का इस्तेमाल करता है. इससे आप स्प्रेडशीट की सार्वजनिक सूची या सेल फ़ीड के लिए क्वेरी कर सकते हैं. साथ ही, आपको मिलने वाली नतीजों को JSON ऑब्जेक्ट के तौर पर दिखाया जा सकता है. नया JSON फ़ीड इस्तेमाल करने के लिए, एक ऐसा स्क्रिप्ट एलिमेंट बनाएं जिसकी src
वैल्यू हो
http://spreadsheets.google.com/feeds/feed/key/worksheet/public/basic?alt=json-in-script&callback=myFunc
जहां feed
फ़ीड का टाइप है, key
उस स्प्रेडशीट की कुंजी है जिसे आपको वापस पाना है. worksheet
वर्कशीट का पोज़िशनल या यूनीक आइडेंटिफ़ायर होता है और myFunc
आपके कॉलबैक फ़ंक्शन का नाम होता है, जो JSON ऑब्जेक्ट को पास करता है. Google डेटा एपीआई के लिए JSON आउटपुट सहायता के बारे में ज़्यादा जानकारी के लिए कृपया हमारा JSON आउटपुट सहायता दस्तावेज़ देखें.
ध्यान दें: पुष्टि किए बिना फ़ीड को फिर से हासिल किया जा सकता है. यह सुविधा सिर्फ़ पब्लिश की गई स्प्रेडशीट के लिए काम करती है.
ध्यान दें: JSON टाइप के साथ काम करने वाले अन्य फ़ीड टाइप और विज़िबिलिटी और प्रोजेक्शन वैल्यू का इस्तेमाल किया जा सकता है. दूसरी तरह के फ़ीड के बारे में ज़्यादा जानकारी पाने के लिए, कृपया स्प्रेडशीट डेटा एपीआई का दस्तावेज़ देखें. इसमें यह भी बताया गया है कि किस तरह की फ़ीड दिखाई दे सकती है और किस चीज़ को दिखाया जा सकता है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2023-03-01 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 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"]]