Google ড্রাইভ কার্যকলাপ পরিষেবা
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
গুগল ড্রাইভ অ্যাক্টিভিটি পরিষেবা আপনাকে অ্যাপস স্ক্রিপ্টে গুগল ড্রাইভ অ্যাক্টিভিটি API ব্যবহার করার অনুমতি দেয়। এই API ব্যবহারকারীদের তাদের গুগল ড্রাইভ অ্যাক্টিভিটি সম্পর্কে তথ্য পুনরুদ্ধার করতে প্রোগ্রাম্যাটিক অ্যাক্সেসের অনুমতি দেয়।
তথ্যসূত্র
এই পরিষেবা সম্পর্কে বিস্তারিত তথ্যের জন্য, Google Drive Activity API-এর রেফারেন্স ডকুমেন্টেশন দেখুন। Apps Script-এর সমস্ত উন্নত পরিষেবার মতো, Google Drive Activity পরিষেবাটি পাবলিক API-এর মতো একই বস্তু, পদ্ধতি এবং পরামিতি ব্যবহার করে। আরও তথ্যের জন্য, পদ্ধতি স্বাক্ষর কীভাবে নির্ধারণ করা হয় তা দেখুন।
/** * Lists 10 activity for a Drive user. * @see https://developers.google.com/drive/activity/v2/reference/rest/v2/activity/query */functionlistDriveActivity(){constrequest={pageSize:10,// Use other parameter here if needed.};try{// Activity.query method is used Query past activity in Google Drive.constresponse=DriveActivity.Activity.query(request);constactivities=response.activities;if(!activities||activities.length===0){console.log("No activity.");return;}console.log("Recent activity:");for(constactivityofactivities){// get time information of activity.consttime=getTimeInfo(activity);// get the action details/informationconstaction=getActionInfo(activity.primaryActionDetail);// get the actor's details of activityconstactors=activity.actors.map(getActorInfo);// get target information of activity.consttargets=activity.targets.map(getTargetInfo);// print the time,actor,action and targets of drive activity.console.log("%s: %s, %s, %s",time,actors,action,targets);}}catch(err){// TODO (developer) - Handle error from drive activity APIconsole.log("Failed with an error %s",err.message);}}/** * @param {object} object * @return {string} Returns the name of a set property in an object, or else "unknown". */functiongetOneOf(object){for(constkeyinobject){returnkey;}return"unknown";}/** * @param {object} activity Activity object. * @return {string} Returns a time associated with an activity. */functiongetTimeInfo(activity){if("timestamp"inactivity){returnactivity.timestamp;}if("timeRange"inactivity){returnactivity.timeRange.endTime;}return"unknown";}/** * @param {object} actionDetail The primary action details of the activity. * @return {string} Returns the type of action. */functiongetActionInfo(actionDetail){returngetOneOf(actionDetail);}/** * @param {object} user The User object. * @return {string} Returns user information, or the type of user if not a known user. */functiongetUserInfo(user){if("knownUser"inuser){constknownUser=user.knownUser;constisMe=knownUser.isCurrentUser||false;returnisMe?"people/me":knownUser.personName;}returngetOneOf(user);}/** * @param {object} actor The Actor object. * @return {string} Returns actor information, or the type of actor if not a user. */functiongetActorInfo(actor){if("user"inactor){returngetUserInfo(actor.user);}returngetOneOf(actor);}/** * @param {object} target The Target object. * @return {string} Returns the type of a target and an associated title. */functiongetTargetInfo(target){if("driveItem"intarget){consttitle=target.driveItem.title||"unknown";return`driveItem:"${title}"`;}if("drive"intarget){consttitle=target.drive.title||"unknown";return`drive:"${title}"`;}if("fileComment"intarget){constparent=target.fileComment.parent||{};consttitle=parent.title||"unknown";return`fileComment:"${title}"`;}return`${getOneOf(target)}:unknown`;}
[[["সহজে বোঝা যায়","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-12-16 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[]]