{"id":2222,"date":"2016-05-30T18:06:57","date_gmt":"2016-05-30T09:06:57","guid":{"rendered":"http:\/\/daily.belltail.jp\/?p=2222"},"modified":"2016-08-19T18:08:53","modified_gmt":"2016-08-19T09:08:53","slug":"%e5%85%ac%e9%96%8bgoogle-calendar%e3%81%8b%e3%82%89rubygoogle-api%e3%81%a7%e3%82%a4%e3%83%99%e3%83%b3%e3%83%88%e3%82%92%e5%8f%96%e5%be%97","status":"publish","type":"post","link":"https:\/\/daily.belltail.jp\/?p=2222","title":{"rendered":"\u516c\u958bGoogle Calendar\u304b\u3089Ruby+Google API\u3067\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97"},"content":{"rendered":"<p>\u3044\u3088\u3044\u30885\u6708\u3082\u7d42\u308f\u308a\u5b63\u7bc0\u306f\u590f\u306b\u3068\u3044\u3046\u6642\u671f\u3067\u3001\u304a\u9b5a\u7684\u306b\u306f\u9b8e\u3084\u9bf5\u306a\u3069\u304c\u65ec\u3092\u8fce\u3048\u308b\u3068\u3044\u3046\u9803\u5408\u3044\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u4eca\u306e\u6642\u671f\u306b\u9b5a\u3084\u91ce\u83dc\u3092\u98df\u3079\u3066\u590f\u30d0\u30c6\u306b\u5099\u3048\u305f\u3044\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u3055\u3066\u3001Google Calendar\u304b\u3089\u30a4\u30d9\u30f3\u30c8\u3092\u81ea\u52d5\u3067\u53d6\u3063\u3066\u304d\u305f\u3044\u3068\u3044\u3046\u3053\u3068\u304c\u3042\u3063\u305f\u306e\u3067\u3001Ruby\u3067\u3084\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>(Calendar\u306b\u304b\u304e\u3089\u305a)Google\u5404\u7a2e\u30b5\u30fc\u30d3\u30b9\u306eAPI\u306f[https:\/\/github.com\/google\/google-api-ruby-client:title=\u516c\u5f0f\u306eGem]\u304c\u516c\u958b\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u308c\u3092\u4f7f\u3046\u306e\u304c\u6700\u3082\u7c21\u5358\u3067\u3059\u3002<br \/>\n[https:\/\/developers.google.com\/google-apps\/calendar\/quickstart\/ruby:title=Ruby Quickstart | Google Calendar API | Google Developers]<br \/>\n[http:\/\/www.rubydoc.info\/github\/google\/google-api-ruby-client\/Google\/Apis\/CalendarV3:title=Class: Google::Apis::CalendarV3::Calendar \u2014 Documentation for google\/google-api-ruby-client (master)]<\/p>\n<p>\u3055\u3089\u306b\u3001\u5404\u30d6\u30ed\u30b0\u306a\u3069\u3067\u65e2\u306bGoogle Calendar API (v3)\u3092\u4f7f\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3088\u304f\u307e\u3068\u307e\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n[http:\/\/iteba.hateblo.jp\/entry\/2015\/02\/03\/175710:title=Ruby\u3067Google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u60c5\u5831\u3092\u5f15\u304d\u629c\u3044\u3066\u307f\u308b \u2013 \u9d8f\u982d\u306e\u30d7\u30ed\u30b0\u30e9\u30e0]<br \/>\n[http:\/\/qiita.com\/iron-breaker\/items\/2440c4ab41a482b1b096:title=ruby\u306b\u3066google\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b \u2013 Qiita]<\/p>\n<p>\u3053\u306e\u8fba\u308a\u306e\u60c5\u5831\u306f\u3001\u57fa\u672c\u7684\u306b\u81ea\u5206\u306e\uff08\u975e\u516c\u958b\u306a\uff09\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u53d6\u3063\u3066\u304f\u308b\u3082\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u50d5\u304c\u3084\u308a\u305f\u3044\u3053\u3068\u306f\u3001\u300c\u4ed6\u4eba\u304c\u516c\u958b\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u30a4\u30d9\u30f3\u30c8\u306e\u60c5\u5831\u3092\u6301\u3063\u3066\u304f\u308b\u300d\u3053\u3068\u3067\u3001<br \/>\n\u4f8b\u3048\u3070\u50d5\u500b\u4eba\u306e\u4e88\u5b9a\u3067\u306a\u304f[https:\/\/calendar.google.com\/calendar\/embed?src=2jqc6fmqn8smj7vdfhj4drpqhk@group.calendar.google.com:title=\u4eba\u529b\u30a2\u30b8\u30e3\u30a4\u30eb\u30a4\u30d9\u30f3\u30c8\u30ab\u30ec\u30f3\u30c0\u30fc powered by \u540d\u53e4\u5c4b\u30a2\u30b8\u30e3\u30a4\u30eb\u52c9\u5f37\u4f1a]\u306b\u3042\u308b\u30a4\u30d9\u30f3\u30c8\u3092API\u7d4c\u7531\u3067\u53d6\u3063\u3066\u304f\u308b\u3001\u3068\u3044\u3046\u3088\u3046\u306a\u3053\u3068\u3092\u3084\u308d\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e0a\u8a18\u306e\u53c2\u8003\u8cc7\u6599\u306f\u3044\u305a\u308c\u3082\u3001\u81ea\u5206\u306e\u30ab\u30ec\u30f3\u30c0\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3001\u305d\u306e\u305f\u3081\u306bOAuth\u306a\u3069\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u5fc5\u8981\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u5f97\u3059\u308b\u306e\u306f\u3082\u3046\u5c11\u3057\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u3053\u3053\u304b\u3089\u306f\u305d\u306e\u65b9\u6cd5\u3002<\/p>\n<p><!--more--><\/p>\n<p>** API\u30ad\u30fc\u306e\u53d6\u5f97<\/p>\n<p>\u307e\u305a\u306fGoogle calendar API\u3092\u53e9\u304f\u305f\u3081\u306eAPI\u30ad\u30fc\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p>&#8211; [https:\/\/cloud.google.com\/console]<br \/>\n&#8211; \u201cGo to APIs overview\u201d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u201dAPI Manager\u201d\u753b\u9762\u3078<br \/>\n&#8211; \u5de6\u5074\u306e\u201dCredentials\u201d\u3092\u30af\u30ea\u30c3\u30af<br \/>\n&#8211; \u201cCreate Credentials\u201d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001API Key\u3092\u9078\u629e<br \/>\n&#8211; \u30c0\u30a4\u30a2\u30ed\u30b0\u3067\u201dServer Key\u201d\u3092\u9078\u629e<br \/>\n&#8211; \u201cCreate server API key\u201d\u753b\u9762\u306e\u60c5\u5831\u3092\u9069\u5207\u306b\u5165\u529b\u3057\u3066Create\u3092\u30af\u30ea\u30c3\u30af<\/p>\n<p>\u3053\u306eAPI\u30ad\u30fc\u306f\u5916\u90e8\u306b\u6f0f\u3089\u3055\u306a\u3044\u3088\u3046\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u542b\u3081\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002\u74b0\u5883\u5909\u6570\u306a\u3069\u3092\u6d3b\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30b5\u30a4\u30c9\u306b\u30a2\u30d7\u30ea\u3068\u3068\u3082\u306b\u914d\u5e03\u3057\u305f\u308a\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>** \u516c\u958b\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u30a4\u30d9\u30f3\u30c8\u306fAPI\u30ad\u30fc\u3060\u3051\u3067\u53d6\u3063\u3066\u3053\u308c\u307e\u3059<\/p>\n<p>\u516c\u958b\u30ab\u30ec\u30f3\u30c0\u30fc\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u53d6\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u8a8d\u8a3c\u95a2\u9023\u306e\u60c5\u5831\u306fAPI\u30ad\u30fc\u306e\u307f\u3067\u3059\u3002<br \/>\n\u3053\u308c\u3092\u4f7f\u3063\u3066\u3001\u7c21\u5358\u306b\u30a4\u30d9\u30f3\u30c8\u3092\u6839\u3053\u305d\u304e\u53d6\u3063\u3066\u304f\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><script src=\"https:\/\/gist.github.com\/belltailjp\/d88e78c993eb3c271fbf417f673aabf5.js\"><\/script><\/p>\n<p>\u4ed6\u306b\u3082\u30ea\u30f3\u30af\u3084\u30a4\u30d9\u30f3\u30c8\u4f5c\u6210\u8005\u306e\u60c5\u5831\u306a\u3069\u304c\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<br \/>\n\u65e5\u6642\u306b\u3064\u3044\u3066\u3001\u65e5\u4ed8\u60c5\u5831\u3068\u6642\u523b\u60c5\u5831\u304c\u305d\u308c\u305e\u308c\u3042\u3063\u3066\u3001\u5168\u65e5\u30a4\u30d9\u30f3\u30c8\u306e\u5834\u5408\u306f\u521d\u65e5\u3068\u6700\u7d42\u65e5\u306e\u65e5\u4ed8\u304c\u3042\u308a\u3001\u958b\u59cb\u7d42\u4e86\u6642\u523b\u304c\u3042\u308b\u5834\u5408\u306f\u305d\u306e\u6642\u523b\u304c\u3042\u308a\u307e\u3059\uff08\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u4e2d\u306e\u8a18\u8ff0\u306e\u901a\u308a\uff09\u3002<br \/>\n\u2026\u306a\u3069\u306a\u3069\u3001\u7d30\u304b\u306aAPI\u306e\u6319\u52d5\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<br \/>\nActiveSupport\u306f\u3001\u65e5\u4ed8\u306e\u7bc4\u56f2\u3092\u6307\u5b9a\u3059\u308b\u305f\u3081\u306bISO8601(RFC3339)\u5f62\u5f0f\u306e\u65e5\u4ed8\u3092\u8868\u73fe\u3059\u308b\u969b\u306b\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3044\u3088\u3044\u30885\u6708\u3082\u7d42\u308f\u308a\u5b63\u7bc0\u306f\u590f\u306b\u3068\u3044\u3046\u6642\u671f\u3067\u3001\u304a\u9b5a\u7684\u306b\u306f\u9b8e\u3084\u9bf5\u306a\u3069\u304c\u65ec\u3092\u8fce\u3048\u308b\u3068\u3044\u3046\u9803\u5408\u3044\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u4eca\u306e\u6642\u671f\u306b\u9b5a\u3084\u91ce\u83dc\u3092\u98df\u3079\u3066\u590f\u30d0\u30c6\u306b\u5099\u3048\u305f\u3044\u3082\u306e\u3067\u3059\u3002 \u3055\u3066\u3001Google Calendar\u304b\u3089\u30a4\u30d9\u30f3\u30c8\u3092\u81ea\u52d5\u3067\u53d6\u3063\u3066 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[23,38],"class_list":["post-2222","post","type-post","status-publish","format-standard","hentry","category-1","tag-ruby","tag-38"],"_links":{"self":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts\/2222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2222"}],"version-history":[{"count":0,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=\/wp\/v2\/posts\/2222\/revisions"}],"wp:attachment":[{"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daily.belltail.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}