この記事は、以下のブログ、プロジェクトのまとめです。 Rails 5 (非beta) でつくる、APIサーバ RailsプロジェクトをHerokuへデプロイし、無料ホスティングしてもらう github: dogwood008/fetch_hatena_bookmark_and_post_to_hatena_blog Rails 5でのプロジェクト作成 Rails 5の使用 まずは準備。 $ mkdir fetch_rss_and_post_hateblog $ cd fetch_rss_and_post_hateblog $ echo "gem 'rails', '~>5.0'" > Gemfile $ mkdir .bundle $ echo '--- BUNDLE_PATH: vendor/bundle BUNDLE_DISABLE_SHARED_GEMS: 1 BUNDLE_BIN:
Botを使ってリマインドなど必要な連絡を行うのは楽しいです。 もう少し何かしゃべってほしいのと、LINEのBotトライアルアカウントを取得したので、動作確認を兼ねてHeroku + ドコモ雑談対話APIで動かしてみました。 たくさんの先人のおかげで比較的楽に構築できました(-人-) 使うもの Heroku: Cloud Application Platform 今回はPHP(Silex)を使います。 LINE BOT API Trial Account (追加募集枠が26日から開始) ドコモ雑談対話API セットアップ Heroku Getting Started on Heroku with PHP に従って、順番にセットアップを行います。 チュートリアルの流れとしては、アカウントの取得からサンプルコードをデプロイして、ログの確認や環境変数の定義など一通りのことが試せるようになっています
はじめに FacebookやLINEが自社のメッセージングサービスのプラットフォームを一部開発者に公開したりと、チャットボットがブームの兆しを見せ始めていますが、先日、NTTドコモとIPI社が共同開発した「Repl-AI」という対話式チャットボットのプラットフォームが公開されました。 [ニュース] IPIとドコモ、自然に会話するボットを簡単に作成できる「Repl-AI」 https://t.co/a2n340V4zH pic.twitter.com/3rQsGqEHZc — ケータイ Watch (@ktai_watch) 2016年4月22日 上記の記事にもある通り、Repl-AIはプログラミング無しで対話式のチャットボットを作成するためのツールです。『「XX」と話しかけたら「YY」と返す』といったルールベースでの対話フローを、ブラウザ上の操作だけで作ることができます。 現時点でRepl
先日LINE社より先着1万名限定でBOTアカウントを自由に開発できる「BOT API Trial Account」が発表されました。 今後LINEだけでなくFacebookなどもbotのAPIを公開する方向でbotサービスが流行りそうな兆しをみせています。 と、いうことで当編集部でもLINEのAPIを利用してサンプルbotを立ち上げてみました。全くエンジニアじゃなくても『なるほどこうなってるのね』と理解するためにもぜひお試しください。 1.LINE BOTのトライアルアカウントを取得アカウントの取得はLINEのビジネス向けポータルサイト「LINE BUSINESS CENTER」 から、利用登録を行います。 (2016年4月15日現在募集上限に達してしまった様です。) https://business.line.me/ 2.アカウントを作るときにbotの見た目を決めるLINEアカウントを作
追記 (4/15) 現在は Let's Encrypt の証明書が利用できるようになっているようです。なので「https で Callback が受け取れない」と言う理由のためだけに Amazon API Gateway を使う必要も無くなりました。 LINE Bot API は Callback URL が https のみで、しかも Let's Encrypt や StartSSL と言った無料の証明書が使えない。どうにか安価で Bot を動かしたいとなると Heroku のようなドメインを指定しなければ Wildcard 証明書が割り当てられている PaaS を使うのが一般的でしょう。 しかし Heroku は外に抜ける IP アドレスがどんどん変わっていくので、 Bot API の IP Whitelist に登録することが出来ない。仕方無いので Heroku に rack-rev
とにかく今すぐ Heroku にデプロイしたい方はこちら。 (要 LINE BOT API のトライアルアカウント) LINE BOT API の呼び出しには Server IP Whitelist に接続元 IP の指定が必要とのことで、Heroku だと難しいかなー、と思いましたがアドオンで解決できました。 Fixie これを使うと HTTP プロキシの URL が発行され、それを通してリクエストすればアウトバウンド IP を固定できるというものです。 無料プランもあるのでそれを使えばとりあえずタダで試せます。 (最初に Proximo という類似アドオンを試そうとしたけどそっちは無料プランなかったので無駄に $5 取られるっぽい。つらい) これを実行するとアウトバウンド IP が出力されるので、それを LINE BOT API の Server IP Whitelist に登録します
■ Sinatra版Amazon-Auth-Proxyの運用を始めた 試験的に作ってみたSinatra版Amazon-Auth-Proxyだが、忙しさにかまけて放置していたら、当初のGAE値上げに続いて今度はAmazonのAPIが11月から変更になるということで、まじめに運用しないといけない感じになってきたのでなんとか実装したのだった。ソースはいつものようにGitHubで: Amazon-Auth-Proxy ちなみに今回のAmazonのAPI変更は、正式なAssociateTagが含まれていないクエリは受け付けなくなるというものなので、今まで日本のAmazon用AssociateTagを使い回して各国向けのクエリを処理していたプロキシは、軒並みダメになる。ちゃんとそれぞれの国向けのAmazonで専用のAssociateTagを発行してもらわなくてはいけないのだ。現在プロキシを運用している
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く