RubyやRailsで外部APIを利用するソフトウェアを開発しているときに、テストで実際に何度もAPIに問い合わせにをしていたら、遅くて話になりません。ましてや、外部APIがメンテナンスなんてことになったら、開発が止まってしまいます。 そこで、webmockなどを利用して、HTTPリクエストやレスポンスのmockを作成することが望ましいです。 vcrを組み合わせて利用すれば、初回だけ実際にHTTPリクエストとレスポンスを記録して、2回目以降は記録したデータからmockとしてデータを返すように簡単にできます。 webmockとvcrのインストール方法 Gemfileに以下のように記述する group :development, :test do gem 'webmock' gem 'vcr' end gemをインストールする $ bundle test/test_helper.rbにVCRに
移転しました http://please-sleep.cou929.nu/20130121.html
Git Hub API for Java Introduction Download Source code Mailing List Guides GitHub App Auth Flow JWT Authentication App Installation Token Working with organizations References Javadoc Project Documentation Project Information Dependencies Maven Coordinates Dependency Management Distribution Management About Licenses Mailing Lists Plugin Management Plugins Source Code Management Summary Team Projec
これApigee | Google Cloud Blogを勝手訳してみる。InfoQの紹介記事Web API Design - 開発者が愛するインターフェイスを作るで十分かも知れませんが、まあ。 導入 これを読んでいるということは、開発者に愛されるようなWeb API をデザインすることを気にかけているのでしょう。そして、実証済のデザインの原則とベストプラクティスとをWeb APIに適用することに関心があるのでしょう。 私たちがデザインを考えるのためのソースのひとつに、RESTがあります。なぜなら、RESTは厳格な標準ではなくアキーテクチュア・スタイルであり、かなりの柔軟さを認めているからです。構造が柔軟かつ自由であるからこそ、デザインのベスト・プラクティスを貪欲に追い求めるのです。 このe-bookはデザインのプラクティスを集めたものです。収録したプラクティスは、私たちがいくつかの世界中
We've seen over 6,500 APIs added to our directory, but we acknowledge they're not all great. In fact, there's a known secret if you've spent much time with APIs: creating a great API is really, really hard. There are a few attributes we've noticed that can make a big difference. Yesterday ProgrammableWeb's John Musser gave a standing room only talk at OSCon about the topic of a great API and boile
We try to stay positive at ProgrammableWeb. We've talked a lot about the keys to a great API, but not so much about what some of the lesser APIs do. And, with a directory of over 6,000 APIs, you'd better believe we've seen some worst practices. Poor Error HandlingREST APIs that ignore HTTP rulesExposing your raw underlying data modelSecurity complexityUnexpected and undocumented releasesPoor devel
自社サービスにAPIを実装する事ってあまりないですよね。 kamadoのプロダクトも現在はAPIは公開してません。 もし提供するのであれば、簡易的な方法ですが、ユーザーテーブルにtokenカラムを追加して、API用のルーティングを作成する…という方法が考えられると思います。 しかし、その実装時間でより良いAPIが実装出来るとしたら素晴らしいですよね。 そこで紹介したいのがgem doorkeeperです。 日本語の記事が見当たらなかったので記事にしました。 github https://github.com/applicake/doorkeeper gem doorkeeperってどんな機能があるのか? 簡単に説明すると、 ・アプリケーションの管理機能 ・アプリケーションの承認管理 ・スコープの設定 いってしまえば、Facebook API(に近い実装)そのまま実装出来ます。 しかもOAu
先日より近日公開予定としていたQiita API、その全貌がついに明らかに! Qiita API documentQiita APIのドキュメントはこちらで参照することができます。 Qiita APIではQiitaから様々なデータを取得したり投稿の実行することが可能です。 さらに、投稿のストック/ストック解除も可能になりました! Qiita gem加えて、Qiita APIのためのQiita gemを公開しました! Qiita gemはgithub上で参照することができます。 Qiita gemを使うことでQiita APIをRubyで簡単に利用することができます。 本日公開されたQiita API、Qiita gemは今すぐ触っていじることが可能です! Qiita Hackathon 10月13日(土)開催!10月13日(土)開催のQiita Hackathonは「Qiita APIを使
Building a back-end API layer introduces a whole new layer of coordination between server and client code. While there are many aspects to this delicate dance of communication, one key ingredient to minimizing back-and-forth-confusion-about what-call-does-what, is consistently communicating about your API endpoints. This is by no means rocket science, but over time I’ve created a template that I n
Delivering deploymentsUsing the Deployments REST API, you can build custom tooling that interacts with your server and a third-party app. Using the REST API to interact with checksYou can use the REST API to build GitHub Apps that run powerful checks against code changes in a repository. You can create apps that perform continuous integration, code linting, or code scanning services and provide de
2018.04.04 detectFace();SDKの提供を終了しました。 2015.02.09 ポストされたjpeg画像にexifのorientation情報が付いている場合、 APIがそれを解釈するようになりました。 (Flash製サンプルでは事前の処理でexif情報が削除されてしまうため、 APIはorientationを認識できません) 2011.06.12 APIに若干の機能追加を行いました。 既存のクライアントとは完全な互換性があります。 入力画像の傾向に応じて検出モードを選択できるようになりました。 詳細はリファレンスを参照して下さい。 サンプルコンテンツ「簡易サンプル」を、 APIの新しい機能を使うように変更しました。 2010.08.26 APIに若干の機能追加を行いました。 既存のクライアントとは完全な互換性があります。 特徴点毎に信頼度が付加されるようになりました。
残念ながら個人的な意見なので殆どの人には響かないに違いないが、できるだけ一般の技術者にわかるように書く。なお実はそれほど現在の業務とは関係ない。 自分がやりたいこと Salesforce(あるいはDatabase.com)のデータにアクセスするHTML5なAjaxアプリ(iPhone対応)を書きたい。なおVisualforceは管理者にセットアップさせるから×。外部サーバ経由は通信ポイントがいたずらに増えるから&IP制限してたときに使えないから×。直接API EndpointにJavaScriptから通信するのが一番よろしい。 現状 REST APIがCORS (Cross-Origin Resource Sharing) に対応してない。SOAP APIの方は(CORSではなくcrossdomain.xmlだが)OKしてるのになんでなのかまったくよくわからない。せっかくImplicit
This document provides guidance on designing RESTful APIs. It recommends using nouns instead of verbs, keeping URLs simple with only two endpoints per resource, and following conventions from leading APIs. Complex variations and optional parameters should be "swept behind the '?'." The document emphasizes designing for application developers by making APIs intuitive, consistent and complete while
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く