{"id":715,"date":"2019-12-26T08:00:44","date_gmt":"2019-12-25T23:00:44","guid":{"rendered":"https:\/\/google-apps-script.net\/instructions\/?p=715"},"modified":"2021-02-18T14:45:56","modified_gmt":"2021-02-18T05:45:56","slug":"how-to-set-anyone-can-add-self-status-to-calendar-events-by-gas","status":"publish","type":"post","link":"https:\/\/for-dummies.net\/gas-noobs\/how-to-set-anyone-can-add-self-status-to-calendar-events-by-gas\/","title":{"rendered":"\u3010\u30b3\u30d4\u30da\u3067\u4f7f\u3048\u308b\u3011GAS\u3067\u30ab\u30ec\u30f3\u30c0\u30fc\u306b\u81ea\u5206\u3092\u8ffd\u52a0\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u64cd\u4f5c"},"content":{"rendered":"<h2>\u30b2\u30b9\u30c8\u4ee5\u5916\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u30ab\u30ec\u30f3\u30c0\u30fc\u30a4\u30d9\u30f3\u30c8\u306b\u81ea\u5206\u81ea\u8eab\u3092\u8ffd\u52a0\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3059\u308b\u30e1\u30bd\u30c3\u30c9&#8212; anyoneCanAddSelf()<\/h2>\n<p>\u4eca\u56de\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30ab\u30ec\u30f3\u30c0\u30fc\u30a4\u30d9\u30f3\u30c8\uff08\u4e88\u5b9a\uff09\u306b\u30e6\u30fc\u30b6\u30fc\u304c\u81ea\u5206\u81ea\u8eab\u3092\u8ffd\u52a0\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3059\u308banyoneCanAddSelf()\u30e1\u30bd\u30c3\u30c9\u306e\u7d39\u4ecb\u3092\u3057\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u30a4\u30d9\u30f3\u30c8\uff08\u4e88\u5b9a\uff09\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u306e1\u3064\u3067\u3059\u304c\u3001anyoneCanAddSelf()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3068\u30b2\u30b9\u30c8\u3068\u3057\u3066\u767b\u9332\u3055\u308c\u3066\u3044\u306a\u3044\u30e6\u30fc\u30b6\u30fc\u304c\u81ea\u5206\u81ea\u8eab\u3092\u4e88\u5b9a\u306b\u30b2\u30b9\u30c8\u3068\u3057\u3066\u8ffd\u52a0\u3067\u304d\u308b\u304b\u3069\u3046\u304b\u3092\u771f\u507d\u5024(true\/false)\u3067\u8fd4\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u4e88\u5b9a\u3092\u4f5c\u6210\u3057\u305f\u3060\u3051\u306e\u72b6\u614b\u3067\u306f\u57fa\u672c\u7684\u306bfalse\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002\u3057\u304b\u3057\u306a\u304c\u3089\u3001setAnyoneCanAddSelf()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u4e88\u5b9a\u306e\u8a2d\u5b9a\u3092true\u306b\u3059\u308b\u3068\u81ea\u5206\u81ea\u8eab\u3092\u30b2\u30b9\u30c8\u3068\u3057\u3066\u767b\u9332\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u81ea\u5206\u81ea\u8eab\u3092\u767b\u9332\u3067\u304d\u308b\u5834\u5408\u306f\u8fd4\u308a\u5024\u306ftrue\u3068\u306a\u308a\u3001\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u8fd4\u308a\u5024\u306ffalse\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><a href=\"#1\">anyoneCanAddSelf()<\/a><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h3>\u300e \u5f15\u6570\u306b\u5165\u308c\u308b\u5024 \u300f<\/h3>\n<p>\u4eca\u56de\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u95a2\u3057\u3066\u306f\u5f15\u6570\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h3 id=\"1\">anyoneCanAddSelf()<\/h3>\n<div id=\"codeheader_js\" class=\"codeheader\">\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c91<\/div>\n<div id=\"codebox\">\n<pre>\/\/\u81ea\u5206\u81ea\u8eab\u3092\u8ffd\u52a0\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3059\u308b\u30b3\u30fc\u30c9\nfunction sampleCode1() {\n  var calendar = CalendarApp.getDefaultCalendar();\n  var date = new Date(); \n  var events = calendar.getEventsForDay(date);\n  for (var i in events) {\n    var event = events[i];\n    \/*\u30a4\u30d9\u30f3\u30c8ID\u3067\u6307\u5b9a\u3059\u308b\u3068\u304d\u306b\u306f\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\n      var eventId = events[i].getId();\n      var event = calendar.getEventById(eventId);\n    *\/\n    console.log(event.anyoneCanAddSelf());\n  }\n}<\/pre>\n<\/div>\n<h4>\u300e \u5909\u6570\u306e\u8aac\u660e \u300f<\/h4>\n<p><span class=\"variables\">calendar<\/span> = \u30c7\u30d5\u30a9\u30eb\u30c8\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u53d6\u5f97<br \/>\n<span class=\"variables\">date<\/span> = \u30d7\u30ed\u30b0\u30e9\u30e0\u5b9f\u884c\u65e5\u3092\u4ee3\u5165<br \/>\n<span class=\"variables\">events<\/span> = \u30d7\u30ed\u30b0\u30e9\u30e0\u5b9f\u884c\u65e5\u306b\u4f5c\u6210\u6e08\u307f\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97<\/p>\n<p>\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u3067\u304d\u305f\u3089&#x25b6;\u30dc\u30bf\u30f3\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u7d50\u679c\u304ctrue\u3067\u3042\u308c\u3070\u30e6\u30fc\u30b6\u30fc\u306f\u81ea\u5206\u81ea\u8eab\u3092\u30b2\u30b9\u30c8\u3068\u3057\u3066\u4e88\u5b9a\u306b\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u72b6\u614b\u3067\u3059\u3002false\u3067\u3042\u308c\u3070\u3067\u304d\u306a\u3044\u72b6\u614b\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306f\u4e88\u5b9a\u306b\u30e6\u30fc\u30b6\u30fc\u81ea\u8eab\u3092\u30b2\u30b9\u30c8\u3068\u3057\u3066\u8ffd\u52a0\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002\u3082\u3057\u771f\u507d\u5024\uff08true\/false\uff09\u3092\u5909\u66f4\u3057\u305f\u3044\u5834\u5408\u306fsetAnyoneCanAddSelf()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b2\u30b9\u30c8\u4ee5\u5916\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u30ab\u30ec\u30f3\u30c0\u30fc\u30a4\u30d9\u30f3\u30c8\u306b\u81ea\u5206\u81ea\u8eab\u3092\u8ffd\u52a0\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3059\u308b\u30e1\u30bd\u30c3\u30c9&#8212; anyoneCanAddSelf() \u4eca\u56de\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30ab\u30ec\u30f3\u30c0\u30fc\u30a4\u30d9\u30f3\u30c8\uff08\u4e88\u5b9a\uff09\u306b\u30e6\u30fc\u30b6\u30fc\u304c\u81ea\u5206\u81ea\u8eab\u3092\u8ffd\u52a0\u3067\u304d\u308b\u304b\u78ba\u8a8d\u3059\u308b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1394,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","spay_email":"","jetpack_publicize_message":"\u3010GAS\u3011anyoneCanAddSelf\u30e1\u30bd\u30c3\u30c9\u3092\u5b8c\u5168\u30de\u30b9\u30bf\u30fc\r\n\r\n#GAS\r\n#GoogleAppsScript\r\n#CalendarApp\r\n#anyoneCanAddSelf","jetpack_is_tweetstorm":false},"categories":[4,16,3],"tags":[66,53,51,52,55,50,54],"jetpack_featured_media_url":"https:\/\/i1.wp.com\/for-dummies.net\/gas-noobs\/wp-content\/uploads\/2019\/12\/CalendarApp_-anyoneCanAddSelf.png?fit=320%2C180&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9Z92k-bx","jetpack_likes_enabled":true,"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/posts\/715"}],"collection":[{"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/comments?post=715"}],"version-history":[{"count":7,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/posts\/715\/revisions"}],"predecessor-version":[{"id":1413,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/posts\/715\/revisions\/1413"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/media\/1394"}],"wp:attachment":[{"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/media?parent=715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/categories?post=715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/for-dummies.net\/gas-noobs\/wp-json\/wp\/v2\/tags?post=715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}