{"id":9390,"date":"2017-12-22T12:15:25","date_gmt":"2017-12-22T03:15:25","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=9390"},"modified":"2017-12-22T14:29:29","modified_gmt":"2017-12-22T05:29:29","slug":"trello-api%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%82%ab%e3%83%bc%e3%83%89%e3%82%92%e6%8a%95%e7%a8%bf%e3%81%99%e3%82%8bvba%e3%83%9e%e3%82%af%e3%83%ad","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=9390","title":{"rendered":"Trello API\u3092\u4f7f\u3063\u3066\u30ab\u30fc\u30c9\u3092\u6295\u7a3f\u3059\u308bVBA\u30de\u30af\u30ed"},"content":{"rendered":"<p>\u4ee5\u524d<a href=\"https:\/\/www.telerik.com\/fiddler\" title=\"Fiddler - Free Web Debugging Proxy - Telerik\" target=\"_blank\">Fiddler<\/a>\u3092\u4f7f\u3063\u3066<a href=\"https:\/\/developers.trello.com\/reference\" title=\"Trello Developers\" target=\"_blank\">Trello API<\/a>\u3092\u5b9f\u884c\u3059\u308b\u8a18\u4e8b\u3092\u66f8\u304d\u307e\u3057\u305f\u304c(\u4e0b\u8a18\u53c2\u7167)\u3001\u4eca\u56de\u306fVBA\u30de\u30af\u30ed\u304b\u3089Trello API\u3092\u53e9\u3044\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=9272\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/TrelloAPI_01_11-120x120.png' alt='Fiddler\u304b\u3089Trello API\u3092\u5b9f\u884c\u3059\u308b\u3002' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2017.10.27<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=9272\">Fiddler\u304b\u3089Trello API\u3092\u5b9f\u884c\u3059\u308b\u3002 <\/a><\/div><div class=\"cardlink_excerpt\">\u30bf\u30b9\u30af\u7ba1\u7406\u306b\u4fbf\u5229\u306a\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u300cTrello\u300d\u3001\u958b\u767a\u8005\u5411\u3051\u306b\u7528\u610f\u3055\u308c\u305fAPI\u3082\u5145\u5b9f\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u52d5\u4f5c\u78ba\u8a8d\u3082\u517c\u306d\u3066Fiddler\u304b\u3089\u5b9f\u884c\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\r\n\r\nAPI\u30ad\u30fc\u306e\u53d6\u5f97\r\n\r\nAPI\u3092\u547c\u3073\u51fa\u3059\u306b\u5f53\u305f\u308a\u3001\u307e\u305a\u306fTrello\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u72b6\u614b\u3067g...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<h4 class=\"style4a\">Trello API\u3092\u4f7f\u3063\u3066\u30ab\u30fc\u30c9\u3092\u6295\u7a3f\u3059\u308bVBA\u30de\u30af\u30ed<\/h4>\n<p>\u6298\u89d2\u306a\u306e\u3067\u3001\u300c<a href=\"https:\/\/www.ka-net.org\/blog\/?p=9287\" title=\"Google Calendar API\u3092\u4f7f\u3063\u3066\u65e5\u672c\u306e\u795d\u65e5\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">Google Calendar API\u3092\u4f7f\u3063\u3066\u65e5\u672c\u306e\u795d\u65e5\u3092\u53d6\u5f97\u3059\u308b\u30de\u30af\u30ed<\/a>\u300d\u3067\u53d6\u5f97\u3057\u305f\u5404\u795d\u65e5\u60c5\u5831\u3092Trello\u306e\u30ab\u30fc\u30c9\u3068\u3057\u3066\u6295\u7a3f\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>API\u30ad\u30fc\u3084\u30c8\u30fc\u30af\u30f3\u3001\u30ea\u30b9\u30c8ID\u306f<a href=\"https:\/\/www.ka-net.org\/blog\/?p=9272\" title=\"Fiddler\u304b\u3089Trello API\u3092\u5b9f\u884c\u3059\u308b\u3002 | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">\u3053\u306e\u8a18\u4e8b<\/a>\u3092\u53c2\u8003\u306b\u3001\u4e8b\u524d\u306b\u53d6\u5f97\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li>\u4e0b\u8a18\u30b3\u30fc\u30c9\u306fScriptControl\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u305f\u3081\u300164\u30d3\u30c3\u30c8\u7248\u306eOffice\u3067\u306f\u52d5\u4f5c\u3057\u307e\u305b\u3093\u3002<\/li>\n<\/ul>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  Dim i As Long\r\n  \r\n  '--------------------------------------------------\r\n  '\u203b\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u5909\u66f4\r\n  '--------------------------------------------------\r\n  Const ApiKey As String = &quot;(API\u30ad\u30fc)&quot;\r\n  Const ApiToken As String = &quot;(\u30c8\u30fc\u30af\u30f3)&quot;\r\n  Const ListId As String = &quot;(\u30ea\u30b9\u30c8ID)&quot;\r\n  '--------------------------------------------------\r\n  \r\n  With ActiveSheet\r\n    For i = 1 To .Cells(.Rows.Count, 1).End(xlUp).Row\r\n      PostTrelloCard .Cells(i, 2).Value, _\r\n                     ApiKey, _\r\n                     ApiToken, _\r\n                     ListId, _\r\n                     Format(.Cells(i, 1).Value, &quot;yyyy-mm-dd&quot;)\r\n    Next\r\n  End With\r\n  MsgBox &quot;\u51e6\u7406\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002&quot;, vbInformation + vbSystemModal\r\nEnd Sub\r\n\r\nPrivate Sub PostTrelloCard(ByVal CardName As String, _\r\n                           ByVal ApiKey As String, _\r\n                           ByVal ApiToken As String, _\r\n                           ByVal ListId As String, _\r\n                           Optional ByVal CardDue As String = &quot;&quot;)\r\n'Trello\u306e\u6307\u5b9a\u3057\u305f\u30ea\u30b9\u30c8\u306b\u30ab\u30fc\u30c9\u3092\u6295\u7a3f\r\n  Dim Url As String\r\n  \r\n  Url = &quot;https:\/\/api.trello.com\/1\/cards?idList=&quot; &amp; ListId &amp; _\r\n        &quot;&amp;key=&quot; &amp; ApiKey &amp; _\r\n        &quot;&amp;token=&quot; &amp; ApiToken &amp; _\r\n        &quot;&amp;name=&quot; &amp; EncodeURL(CardName)\r\n  If Len(Trim(CardDue)) &gt; 0 Then Url = Url &amp; &quot;&amp;due=&quot; &amp; EncodeURL(CardDue &amp; &quot;T00:00:00+09:00&quot;) '\u6642\u9593\u306f0\u6642\u56fa\u5b9a\r\n  \r\n  With CreateObject(&quot;WinHttp.WinHttpRequest.5.1&quot;)\r\n    .Open &quot;POST&quot;, Url, False\r\n    .Send\r\n    Select Case .Status\r\n      Case 200: 'Debug.Print .ResponseText '\u78ba\u8a8d\u7528\r\n      Case Else: MsgBox &quot;\u51e6\u7406\u304c\u5931\u6557\u3057\u307e\u3057\u305f\u3002&quot;, vbCritical + vbSystemModal\r\n    End Select\r\n  End With\r\nEnd Sub\r\n\r\nPrivate Function EncodeURL(ByVal Target As String) As String\r\n'URL\u30a8\u30f3\u30b3\u30fc\u30c9\r\n  With CreateObject(&quot;ScriptControl&quot;)\r\n    .Language = &quot;JScript&quot;\r\n    EncodeURL = .CodeObject.encodeURIComponent(Target)\r\n  End With\r\nEnd Function<\/pre>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u554f\u984c\u304c\u7121\u3051\u308c\u3070\u4e0b\u56f3\u306e\u3088\u3046\u306b\u30ab\u30fc\u30c9\u304c\u6295\u7a3f\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/TrelloAPI_02_01.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/TrelloAPI_02_01.gif\" alt=\"\" width=\"571\" height=\"481\" class=\"alignnone size-full wp-image-9391\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/TrelloAPI_02_02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/TrelloAPI_02_02.jpg\" alt=\"\" width=\"883\" height=\"766\" class=\"alignnone size-full wp-image-9392\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/TrelloAPI_02_02.jpg 883w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/TrelloAPI_02_02-300x260.jpg 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/TrelloAPI_02_02-768x666.jpg 768w\" sizes=\"auto, (max-width: 883px) 100vw, 883px\" \/><\/a><\/p>\n<p>Trello\u306b\u4e00\u62ec\u6295\u7a3f\u3057\u305f\u3044\u60c5\u5831\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u4eca\u56de\u7d39\u4ecb\u3057\u305f\u30de\u30af\u30ed\u306e\u3088\u3046\u306b\u3001\u5916\u90e8\u304b\u3089API\u3092\u547c\u3073\u51fa\u3059\u306e\u304c\u304a\u624b\u8efd\u3067\u4fbf\u5229\u3067\u3059\u3002<\/p>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n<h4 class=\"style4a\">Visual Basic Advent Calendar 2017<\/h4>\n<p><a href=\"https:\/\/www.ka-net.org\/blog\/?p=9388\" title=\"RSS\u306e\u65e5\u4ed8\u3092\u5909\u63db\u3059\u308bVBA\u30de\u30af\u30ed | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\">\u524d\u56de\u306e\u8a18\u4e8b<\/a>\u3068\u540c\u69d8\u3001\u4eca\u56de\u306e\u8a18\u4e8b\u3082\u300c<a href=\"https:\/\/qiita.com\/advent-calendar\/2017\/vb\" title=\"Visual Basic Advent Calendar 2017 - Qiita\" target=\"_blank\">Visual Basic Advent Calendar 2017<\/a>\u300d\u306b\u53c2\u52a0\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4ee5\u524dFiddler\u3092\u4f7f\u3063\u3066Trello API\u3092\u5b9f\u884c\u3059\u308b\u8a18\u4e8b\u3092\u66f8\u304d\u307e\u3057\u305f\u304c(\u4e0b\u8a18\u53c2\u7167)\u3001\u4eca\u56de\u306fVBA\u30de\u30af\u30ed\u304b\u3089Trello API\u3092\u53e9\u3044\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 Trello API\u3092\u4f7f\u3063\u3066\u30ab\u30fc\u30c9\u3092\u6295\u7a3f\u3059\u308bVBA\u30de\u30af\u30ed \u6298\u89d2 [&hellip;]","protected":false},"author":1,"featured_media":7120,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[Trello API\u3092\u4f7f\u3063\u3066\u30ab\u30fc\u30c9\u3092\u6295\u7a3f\u3059\u308bVBA\u30de\u30af\u30ed]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[48,4],"tags":[],"class_list":["post-9390","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-office","category-office"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-OfficeVBA.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-2rs","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9390"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9390\/revisions"}],"predecessor-version":[{"id":9393,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9390\/revisions\/9393"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7120"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}