সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
Google ড্রাইভ লেবেল উন্নত পরিষেবার মাধ্যমে আপনার ড্রাইভ ফাইল এবং ফোল্ডারগুলির জন্য লেবেল তৈরি এবং পরিচালনা করুন৷ এই উন্নত পরিষেবার সাহায্যে, আপনি Apps স্ক্রিপ্টে ড্রাইভ লেবেল API- এর সমস্ত বৈশিষ্ট্য ব্যবহার করতে পারেন৷
এই পরিষেবা সম্পর্কে আরও তথ্যের জন্য, Google ড্রাইভ লেবেল API-এর ডকুমেন্টেশন দেখুন। Apps স্ক্রিপ্টের সমস্ত উন্নত পরিষেবাগুলির মতো, ড্রাইভ লেবেল API পরিষেবাটি পাবলিক API হিসাবে একই বস্তু, পদ্ধতি এবং পরামিতিগুলি ব্যবহার করে৷
সমস্যাগুলি রিপোর্ট করতে এবং অন্যান্য সহায়তা খুঁজতে, Google ড্রাইভ লেবেল API সমর্থন নির্দেশিকা দেখুন।
/** * List labels available to the user. */functionlistLabels(){letpageToken=null;letlabels=[];do{try{constresponse=DriveLabels.Labels.list({publishedOnly:true,pageToken:pageToken});pageToken=response.nextPageToken;labels=labels.concat(response.labels);}catch(err){// TODO (developer) - Handle exceptionconsole.log('Failed to list labels with error %s',err.message);}}while(pageToken!=null);console.log('Found %d labels',labels.length);}
একটি লেবেল পান
নিম্নলিখিত কোড নমুনা দেখায় কিভাবে একটি একক লেবেল তার রিসোর্স নাম দ্বারা পেতে হয় (যা লেবেলের স্ট্রিং মান)। লেবেলের নাম খুঁজতে, API-এর মাধ্যমে লেবেলের তালিকা পান বা ড্রাইভ লেবেল ম্যানেজার ব্যবহার করুন। লেবেল ম্যানেজার সম্পর্কে আরও তথ্যের জন্য, ড্রাইভ লেবেল পরিচালনা করুন এ যান।
/** * Get a label by name. * @param {string} labelName The label name. */functiongetLabel(labelName){try{constlabel=DriveLabels.Labels.get(labelName,{view:'LABEL_VIEW_FULL'});consttitle=label.properties.title;constfieldsLength=label.fields.length;console.log(`Fetched label with title: '${title}' and ${fieldsLength} fields.`);}catch(err){// TODO (developer) - Handle exceptionconsole.log('Failed to get label with error %s',err.message);}}
একটি ড্রাইভ আইটেম জন্য লেবেল তালিকা
নিম্নলিখিত কোড নমুনা দেখায় কিভাবে একটি ড্রাইভ আইটেম পেতে এবং সেই আইটেমটিতে প্রয়োগ করা সমস্ত লেবেল তালিকাভুক্ত করা যায়৷
/** * List Labels on a Drive Item * Fetches a Drive Item and prints all applied values along with their to their * human-readable names. * * @param {string} fileId The Drive File ID */functionlistLabelsOnDriveItem(fileId){try{constappliedLabels=Drive.Files.listLabels(fileId);console.log('%d label(s) are applied to this file',appliedLabels.labels.length);appliedLabels.labels.forEach((appliedLabel)=>{// Resource name of the label at the applied revision.constlabelName='labels/'+appliedLabel.id+'@'+appliedLabel.revisionId;console.log('Fetching Label: %s',labelName);constlabel=DriveLabels.Labels.get(labelName,{view:'LABEL_VIEW_FULL'});console.log('Label Title: %s',label.properties.title);Object.keys(appliedLabel.fields).forEach((fieldId)=>{constfieldValue=appliedLabel.fields[fieldId];constfield=label.fields.find((f)=>f.id==fieldId);console.log(`Field ID: ${field.id}, Display Name: ${field.properties.displayName}`);switch(fieldValue.valueType){case'text':console.log('Text: %s',fieldValue.text[0]);break;case'integer':console.log('Integer: %d',fieldValue.integer[0]);break;case'dateString':console.log('Date: %s',fieldValue.dateString[0]);break;case'user':constuser=fieldValue.user.map((user)=>{return`${user.emailAddress}: ${user.displayName}`;}).join(', ');console.log(`User: ${user}`);break;case'selection':constchoices=fieldValue.selection.map((choiceId)=>{returnfield.selectionOptions.choices.find((choice)=>choice.id===choiceId);});constselection=choices.map((choice)=>{return`${choice.id}: ${choice.properties.displayName}`;}).join(', ');console.log(`Selection: ${selection}`);break;default:console.log('Unknown: %s',fieldValue.valueType);console.log(fieldValue.value);}});});}catch(err){// TODO (developer) - Handle exceptionconsole.log('Failed with error %s',err.message);}}
[[["সহজে বোঝা যায়","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"]],["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["Utilize the Google Drive Labels advanced service in Apps Script to create and manage labels for your Google Drive files and folders, leveraging the Drive Labels API."],["To use this advanced service, ensure you enable the Advanced Drive Service in your Apps Script project settings before implementation."],["Access comprehensive documentation and support resources for the Google Drive Labels API, which uses the same structure as the public API, in the provided references."],["Explore the provided sample code snippets to learn how to list available labels, retrieve specific labels by name, and list labels applied to Drive items using Apps Script."]]],[]]