This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"appengine" | |
"appengine/urlfetch" | |
) | |
// 中省略 | |
c := appengine.NewContext(r) | |
client := urlfetch.Client(c) | |
// deadline変更 | |
transport := &urlfetch.Transport{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// google.golang.org/cloud でcontextを作ると、GCPの各サービス用のライブラリが使えるようになるっぽい。 | |
c := appengine.NewContext(r) | |
tokenSource := google.AppEngineTokenSource(c, storage.ScopeFullControl) | |
client := oauth2.NewClient( | |
c, | |
tokenSource, | |
) | |
ctx := cloud.NewContext(appengine.AppID(c), client) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 以下のパスを追加 | |
# 受信用メールアドレスは、こちらを参照。 | |
# https://developers.google.com/appengine/docs/python/mail/receivingmail | |
url: /_ah/mail/受信用メールアドレス | |
script: handle_sendkindle.app | |
login: admin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class aaaa(webapp2.handler): | |
def get(self, path1, path2=None, path3=None) | |
if path2 is None: | |
path2='defult' | |
if path3 is None: | |
path3='defult' | |
app = webapp2.WSGIApplication([ | |
webapp2.Route(r'/<path1>/<path2>/<path3>', handler=aaaa), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import webapp2 | |
import logging | |
from twilio.util import TwilioCapability | |
import twilio.twiml | |
from app.handlers.common import comJinja2 | |
from app.handlers.message_config import * |