বৈশিষ্ট্য বস্তু ব্যবহারকারী, নথি, বা স্ক্রিপ্ট বৈশিষ্ট্য অ্যাক্সেস করতে ইন্টারফেস হিসাবে কাজ করে। নির্দিষ্ট সম্পত্তির ধরন নির্ভর করে Properties Service তিনটি পদ্ধতির মধ্যে কোন স্ক্রিপ্টটিকে বলা হয়: Properties Service.getDocumentProperties() , Properties Service.getUserProperties() , অথবা Properties Service.getScriptProperties() । বৈশিষ্ট্য স্ক্রিপ্ট মধ্যে ভাগ করা যাবে না. সম্পত্তির ধরন সম্পর্কে আরও তথ্যের জন্য, বৈশিষ্ট্য পরিষেবার নির্দেশিকা দেখুন।
পদ্ধতি
| পদ্ধতি | রিটার্ন টাইপ | সংক্ষিপ্ত বিবরণ |
|---|---|---|
delete All Properties() | Properties | বর্তমান Properties স্টোরের সমস্ত বৈশিষ্ট্য মুছে দেয়। |
delete Property(key) | Properties | বর্তমান Properties দোকানে প্রদত্ত কী দিয়ে সম্পত্তি মুছে দেয়। |
get Keys() | String[] | বর্তমান Properties দোকানে সব কী পায়। |
get Properties() | Object | বর্তমান Properties দোকানে সমস্ত কী-মানের জোড়ার একটি অনুলিপি পায়। |
get Property(key) | String | বর্তমান Properties স্টোরে প্রদত্ত কীটির সাথে সম্পর্কিত মান পায়, অথবা যদি এই ধরনের কোন কী বিদ্যমান না থাকে তাহলে null । |
set Properties(properties) | Properties | বর্তমান Properties স্টোরে প্রদত্ত বস্তু থেকে সমস্ত কী-মান জোড়া সেট করে। |
set Properties(properties, deleteAllOthers) | Properties | বর্তমান Properties স্টোরে প্রদত্ত বস্তু থেকে সমস্ত কী-মান জোড়া সেট করে, ঐচ্ছিকভাবে স্টোরের অন্যান্য সমস্ত বৈশিষ্ট্য মুছে দেয়। |
set Property(key, value) | Properties | বর্তমান Properties দোকানে প্রদত্ত কী-মান জোড়া সেট করে। |
বিস্তারিত ডকুমেন্টেশন
delete All Properties()
বর্তমান Properties স্টোরের সমস্ত বৈশিষ্ট্য মুছে দেয়।
// Deletes all user properties. const userProperties = PropertiesService.getUserProperties(); userProperties.deleteAllProperties();
প্রত্যাবর্তন
Properties - এই Properties দোকান, চেইনিং জন্য
delete Property(key)
বর্তমান Properties দোকানে প্রদত্ত কী দিয়ে সম্পত্তি মুছে দেয়।
// Deletes the user property 'nickname'. const userProperties = PropertiesService.getUserProperties(); userProperties.deleteProperty('nickname');
পরামিতি
| নাম | টাইপ | বর্ণনা |
|---|---|---|
key | String | সম্পত্তি মুছে ফেলার জন্য কী |
প্রত্যাবর্তন
Properties - এই Properties দোকান, চেইনিং জন্য
get Keys()
বর্তমান Properties দোকানে সব কী পায়।
// Sets several properties, then logs the value of each key. const scriptProperties = PropertiesService.getScriptProperties(); scriptProperties.setProperties({ cow: 'moo', sheep: 'baa', chicken: 'cluck', }); const keys = scriptProperties.getKeys(); Logger.log('Animals known:'); for (let i = 0; i < keys.length; i++) { Logger.log(keys[i]); }
প্রত্যাবর্তন
String[] — বর্তমান Properties স্টোরের সমস্ত কীগুলির একটি অ্যারে
get Properties()
বর্তমান Properties দোকানে সমস্ত কী-মানের জোড়ার একটি অনুলিপি পায়। উল্লেখ্য যে প্রত্যাবর্তিত বস্তুটি স্টোরের একটি লাইভ ভিউ নয়। ফলস্বরূপ, প্রত্যাবর্তিত বস্তুর বৈশিষ্ট্যগুলি পরিবর্তন করলে তা স্বয়ংক্রিয়ভাবে স্টোরেজে আপডেট হবে না, বা এর বিপরীতে।
// Sets several script properties, then retrieves them and logs them. const scriptProperties = PropertiesService.getScriptProperties(); scriptProperties.setProperties({ cow: 'moo', sheep: 'baa', chicken: 'cluck', }); const animalSounds = scriptProperties.getProperties(); // Logs: // A chicken goes cluck! // A cow goes moo! // A sheep goes baa! for (const kind in animalSounds) { Logger.log('A %s goes %s!', kind, animalSounds[kind]); }
প্রত্যাবর্তন
Object — বর্তমান Properties স্টোরের সমস্ত কী-মানের জোড়ার একটি অনুলিপি
get Property(key)
বর্তমান Properties স্টোরে প্রদত্ত কীটির সাথে সম্পর্কিত মান পায়, অথবা যদি এই ধরনের কোন কী বিদ্যমান না থাকে তাহলে null ।
// Gets the user property 'nickname'. const userProperties = PropertiesService.getUserProperties(); const nickname = userProperties.getProperty('nickname'); Logger.log(nickname);
পরামিতি
| নাম | টাইপ | বর্ণনা |
|---|---|---|
key | String | পুনরুদ্ধার করার জন্য সম্পত্তি মান জন্য কী |
প্রত্যাবর্তন
String — বর্তমান Properties দোকানে প্রদত্ত কী-এর সাথে যুক্ত মান
set Properties(properties)
বর্তমান Properties স্টোরে প্রদত্ত বস্তু থেকে সমস্ত কী-মান জোড়া সেট করে।
// Sets multiple user properties at once. const userProperties = PropertiesService.getUserProperties(); const newProperties = { nickname: 'Bob', region: 'US', language: 'EN' }; userProperties.setProperties(newProperties);
পরামিতি
| নাম | টাইপ | বর্ণনা |
|---|---|---|
properties | Object | সেট করার জন্য কী-মান জোড়া সমন্বিত একটি বস্তু |
প্রত্যাবর্তন
Properties - এই Properties দোকান, চেইনিং জন্য
set Properties(properties, deleteAllOthers)
বর্তমান Properties স্টোরে প্রদত্ত বস্তু থেকে সমস্ত কী-মান জোড়া সেট করে, ঐচ্ছিকভাবে স্টোরের অন্যান্য সমস্ত বৈশিষ্ট্য মুছে দেয়।
// Sets multiple user properties at once while deleting all other user // properties. const userProperties = PropertiesService.getUserProperties(); const newProperties = { nickname: 'Bob', region: 'US', language: 'EN' }; userProperties.setProperties(newProperties, true);
পরামিতি
| নাম | টাইপ | বর্ণনা |
|---|---|---|
properties | Object | সেট করার জন্য কী-মান জোড়া সমন্বিত একটি বস্তু |
delete All Others | Boolean | প্রোপার্টি অবজেক্টের অন্যান্য সমস্ত কী-মানের জোড়া মুছে ফেলার জন্য true ; না false |
প্রত্যাবর্তন
Properties - এই Properties দোকান, চেইনিং জন্য
set Property(key, value)
বর্তমান Properties দোকানে প্রদত্ত কী-মান জোড়া সেট করে।
// Sets the user property 'nickname' to 'Bobby'. const userProperties = PropertiesService.getUserProperties(); userProperties.setProperty('nickname', 'Bobby');
পরামিতি
| নাম | টাইপ | বর্ণনা |
|---|---|---|
key | String | সম্পত্তি জন্য চাবিকাঠি |
value | String | কী-এর সাথে যুক্ত করার মান |
প্রত্যাবর্তন
Properties - এই Properties দোকান, চেইনিং জন্য